How to open a serial terminal in Eclipse Juno? - eclipse-juno

In previous versions of Eclipse I have been able to open a view that presented a serial terminal/console.
How do I do this in Eclipse Juno?
I have a "Terminals" view open and it has text that says:
To open a terminal, right-click the Terminal subsystem under the target. Then select 'Launch Terminal' from the context menu.
I really have no idea what this is talking about and I've been using Eclipse for several years now!
Can someone shed some light on this?
EDIT:
I've discovered that the "Terminal Subsystem under the target", refers to the "Remote Systems" view. I can't find any options for a serial terminal though.

To use a serial terminal in Eclipse Juno.
1: Install the software for serial terminals:
Navigate to: Help -> Install New Software...
Dropdown list for Work with: to say Juno - http://download.eclipse.org/releases/juno
Select: Mobile and Device Development, especially Target Management Terminal which is "An ANSI (vt102) compatible Terminal including plug-ins for Serial, SSH and Telnet connections."
Click Next and anything else to finish the install ...
2: Open the view
Navigate to: Window -> Show View -> Other ... -> Terminal -> Terminal (NOTE: singular Terminal, not plural Terminals)
3: Open a terminal
The rest should be fairly obvious as the view contains icons to Connect, Disconnect, Settings, etc which are related to Serial, SSH and Telnet connections.

Under remote systems, there is "Local" and the remote connection, in my case 192.168.1.12. Click on the "+" to open subfolders. You should see the project you are working on. Right click on it. Select "Launch Terminal", the third one from the bottom.

Load up the Remote Systems perspective to connect to the server. There you will be able to open an SSH terminal.

There is an Incubator project called Local Terminal. You can install it from the Eclipse update site: http://download.eclipse.org/releases/indigo/ under General Purpose Tools->Local Terminal

Related

Alternative to "Web Server for Chrome"?

I need help with an alternative to "Web Server for Chrome" extension provided by Chrome. I don't even want to download chrome let alone using it so is there any alternative to run HTMl and JS files on a web server? I want something very simple which does not require extra coding or effort. please and thank you.
You should install a server software for this purpose like XAMPP server. No need to download a specific browser as long as you have the server software.
Maybe you can do the following (if you have python installed ):
Open command prompt
Type cd your_path_to_folder_in_which_file_is_located
Type the command : python -m http.server
Hit enter
Open browser and enter localhost:8000
Done! to cancel the server , hit CTRL+C
If you do not have python then you can install Web Server for Chrome on any other browser . Edge , firefox .Simply go into the chrome web store and search the same . You should be able to add it the usual way.

how turn off browser sync in sublime text 3?

I'm using Sublime Text 3 and installed browsersync package for live reloading.
When I quit from Sublime and close liveserver app in my browser and try to open new liveserver with react start command I get a message that say: "Something is already running on port 3000." Then I check localhost:3000 and the browser still sync to Sublime I don't know how to turn off liveserver in port 3000 ?
please help me
I assume that this is the plugin you're using. Unfortunately, the plugin has been abandoned for 5 years, and the way it's written, there is no method for killing the node server once you're done with the plugin. From the Windows command line, this:
taskkill /im node-windows.exe /f /t
should do the trick, but you'll have to run it manually. Alternatively, you can use Task Manager to kill any node-windows.exe processes.
Another way to kill the service is going to
Start -> Resource Monitor -> Network
Under "Listening Ports" check for your port number, in this case 3000.
Take the process Id and then look for it under "Processes with Network Activity"
Check the process and right click -> End Process.
This will end the process utilizing the port 3000.
Try using Ctrl+C on your keyboard in your terminal or your command line (depending on whether your operating system is Unix based or Windows based). PowerShell should work too, if on a PC.

How to symbolicate crashes in Xcode 7.3?

Can you help me get my crashes symbolicated?
In Xcode 7.3, Window -> Organizer -> Crashes, I have crash reports from my latest TestFlight builds. They were built on this Mac, and all the archives with the corresponding dSYMs are in the Archives tab. The app is divided into a number of frameworks and the main app, and many are a mix of Swift and Objective C. In the crash log I can see the name of the frameworks and app listed correctly, but all the entries for my frameworks and app are in hex. UIKit is symbolicated just fine.
When I look in iTunes Connect, it says "Yes" to "Includes Symbols" and allows me to download the dSYMs. When building, the "Debug Information Format" option was set to "DWARF with dSYM". I tried setting "Strip Debug Symbols During Copy"
and "Strip Linked Product" to "No" to see if that made a difference. It didn't.
I cannot find the symbolicatecrash app on my system, not even in /usr/bin or /Applications/Xcode.app/Contents/SharedFrameworks/DTDeviceKitBase.framework/Versions/A/Resources/symbolicatecrash, but I have an older Xcode 5 where I could grab it. However, it does not resolve the symbols anymore.
I have the same problem in Instruments, if I profile my app, UIKit is symbolicated just fine, but my frameworks and app only show hex.
I know there have been a lot of posts about this, but I have going through them a lot from the 7.3 beta period and until now and have not found a solution
The location of symbolicatecrash has changed in Xcode 7.3:
/Applications/Xcode.app/Contents/SharedFrameworks/DVTFoundation.framework/Versions/A/Resources/symbolicatecrash
After reading this:
https://developer.apple.com/library/content/technotes/tn2151/_index.html
you find out that the App Store is responsible for symbolicating crash reports that come from TestFlight – not Xcode. And it appears the App Store is very unreliable at doing it.
Here's a workaround.
Go to the Archives tab in the "Organizer" window and make sure that for whatever build you need to symbolicate a crash report for, you have clicked the "Download dSYMS..." button over on the right side of the page. This is required if you are uploading in BitCode.
Attach an iOS device so that it appears in the "Devices" window.
Select the device and click "View Device Logs".
Now, go back to the Organizer Window, select the "Crashes" tab and select one of the crashes that did not get symbolicated.
Right-click on it and select "Show in Finder".
Right-click on the revealed .xccrashpoint bundle and select "Show Package Contents".
Drill down into DistributionInfos -> all -> Logs.
Drag any of the .crash files into the left side of the "View Device Logs" pane open in the Devices window.
Wait a second or two for Xcode to symbolicate the crash.
Same here. Having a hard time finding the symbolicatecrash after upgrading to 7.3.
However, you can still use the atos though.
You can find the tutorial here Symbolicate crash in iOS8 with Xcode 6 .1
I do not upload symbols with my application, so the App Store cannot symbolicate for me. I used the following workaround to symbolicate all of the crashlogs that XCode downloads from the store. These instructions are for XCode 8. The paths for the symbolicate crash app will vary from version to version of XCode but the ideas should be the same in each version.
Place your symbols where the symbolicator can find them: Place your symbols (.dsym) file in your Archives directory. You can find this by going to Organizer, context clicking on an archive and choosing "show in finder". Navigate up to the Archives directory (e.g. /Users/USERNAME/Library/Developer/Xcode/Archives) and place your dsym file there. It can be in other locations as well, it's just that I've verified that this one works.
Download the crash logs: In XCode, make sure that you've downloaded the crashlogs for the build you want to symbolicate (Organizer->Crashes, click on your app and then choose the version of your app in the panel to the right of the list of apps).
Locate the crash logs on disk: In the panel that has the App Version and build number, context click on one of the crashes and choose "Show in Finder". Navigate up to the "Crashes Folder" and note this location e.g.: /Users/USERNAME/Library/Developer/Xcode/Products/com.company-name.Your-App/VERSION/Crashes
Setup DEVELOPER_DIR for symbolicatecrash on the command line: Open a terminal window and CD to the crashes directory from step 3 and set the DEVELOPER_DIR like this: cd /Users/USERNAME/Library/Developer/Xcode/Products/com.companyname.Your-App/VERSION/Crashes/
export set DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer
(this should be the location of the "Developer" directory inside of your XCode app bundle).
Locate the symbolicatecrash script: symbolicatecrash knows how to find your symbolicate crash logs using the dsym from step 1. Apple moves it around from version to version of xcode. You can find it like this: find /Applications/Xcode.app/ -name symbolicatecrash. In XCode 8, it is in /Applications/Xcode.app/Contents/SharedFrameworks/DVTFoundation.framework/Versions/A/Resources/symbolicatecrash
Backup your crashes folder You may want to backup your crashes folder (/Users/USERNAME/Library/Developer/Xcode/Products/com.companyname.Your-App/VERSION/Crashes/)
Symbolicate all of your crashes: Be sure that you are still in the Crashes directory from step 4 and type
for i in `find . -type f -name \*.crash`; do cat $i | /Applications/Xcode.app/Contents/SharedFrameworks/DVTFoundation.framework/Versions/A/Resources/symbolicatecrash --output $i.sym; mv $i.sym $i; done;
This symbolicates each .crash file into an output file and then copies that back over the original, unsymbolicated file.
View Crashes Return to the crashes organizer and view the symbolicated crashes
I tried to copy symbolicatecrash file from xCode 7.2 and pasted it in xCode 7.3 in the following path:
/Applications/Xcode.app/Contents/SharedFrameworks/DTDeviceKitBase.framework/Versions/Current/Resources/
Am using Crasher script to symbolicate the crash reports How to use Crasher
According to the documentation of Xcode 9.0:
The Crashes Organizer symbolicates unsymbolicated logs, if they are
selected, using a local .dSYM indexed by Spotlight. (22550064)
You can check out more on this in Xcode's Documentation.

How to create a Chrome profile programmatically?

Development, testing, staging environments are controlled via different proxy servers in my setup. I want to script creation of multiple Chrome profiles (sometimes called "user" or "person") and connect to a different proxy server for each of them. Finally I want to share this script with colleagues so that they have access to the exactly same setup.
The latter can be done via scripted installation of extensions such as Falcon Proxy or Proxy Helper to the Chrome profile. I would like to know how to script creation of the different profiles.
A profile is a folder inside ~/.config/google-chrome (Linux, ~/Library/Application Support/Google/Chrome (Mac OS X) and %USERPROFILE%\AppData\Local\Google\Chrome\User Data (Windows). But how to create and initialize one? Where do I register the new profile?
Creating a user
The following example applies to Windows, but the basic procedure should be the same.
First, change to the UserData folder in your Chrome installation:
cd "%APPDATA%\..\Local\Google\Chrome\User Data"
This method will copy the current user as a template for the new user. If the new user should be blank, you need to delete (CTRL + SHIFT + DEL the current browser data).
Now create a new user:
mkdir NewUser && copy Default NewUser
Change your directory to the chrome installation:
cd "C:\Program Files (x86)\Google\Chrome\Application"
Factory-Reset all user parameters:
chrome.exe --user-data-dir="..\User Data\NewUser" -first-run
where --user-data-dir is the path (full or relative) to the previously created NewUser directory.
Running as NewUser
To run chrome again using this profile, simply run chrome without the -first-run flag.
From this documentation, I finally found a way to create a user/person, rather than a separate profile. The difference is especially important in Mac OS X since different profiles can be opened concurrently using the same Chrome process.
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --args --profile-directory="StagingEnv" --first-run
The only unfortunate fact is that this new person doesn't inherit the name from the profile directory. Instead, it is always called Person X where X is an increment number.
I need to go to the Local State file to change it.
grep -o '"StagingEnv":{[^}]*}' ~/Library/Application\ Support/Google/Chrome/Local\ State
"StagingEnv":{"active_time":1437709453.172762,"avatar_icon":"chrome://theme/IDR_PROFILE_AVATAR_6","background_apps":false,"is_ephemeral":false,"is_omitted_from_profile_list":false,"is_using_default_avatar":true,"is_using_default_name":true,"managed_user_id":"","name":"<b>Person 3</b>","user_name":""}
This file is overridden when Chrome quits, so I need to kill Chrome, change the file and run Chrome again.
I think the easiest way to create multiple chrome profile is
On your computer, open Chrome.
At the top right, click Profile.
Click Manage people.
Click Add person.
Choose a name and a photo/picture.
Select Create a short cut on the desktop.
Click Save. A new window will open and ask you to turn on sync which is
optional.
By this, each chrome profile will be created and you can check on C:\Users\youname\AppData\Local\Google\Chrome\User Data.

Enable XDebug in Behat

I am using behat+mink. I wrote some features and am now running tests.
How can I enable xdebug to to stop on breakpoints in phpstorm when running behat tests ?
I have not tried this with Mink yet, but this is configuration that allows me to step through debugging of behat (with behat running on a remote server):
Configure your server with x-debug
Of note, since this is commandline, you need to edit the cli config under /etc/php5/cli/conf.d/20-xdebug.ini.
Set remote_host to the ip of the computer you're using PHPSTORM from
Set autostart = 1
Disable connect_back, you will initiate debugging from the server so there is nothign to connect back to
You can also do this without editing your ini by exporting values as env variables, just remember to do this each time you start a new shell (or add to your .bash_profile file):
export XDEBUG_CONFIG="remote_host=<YOUR IP>"
Configure PHPStorm's Debugger
It seems by default, PHPStorm doesn't understand remote-cli scripts, so we need to add a configuration that tells it to expect a CLI script to trigger xdebug
Open the Run Menu and select "Edit Configurations"
Click the Green "+" to to add a new configuration and select "PHP Remote Debug"
Name the Configuration (E.G. MyServer-Behat)
Under the Servers: menu, select your remote server.
If you haven't configured your remote server yet, then do this by clicking the "..." button on the right
Click the Green "+" to add a server configuration. Give it a name (E.G. MyServer) and fill in it's address under Host
Configure it's Path Mappings. This is important if the path to your source files is different on your PHPStorm computer from your server. You can see in my example that i'm relating my local checkout (~/Work/Symfony/) to my server install (/var/www/). I specifically added mappings for src, bin, web, app, and vendor by clicking in the space to the right under "Absolute path on the server" and typing in the path. I had issues just mapping the root's, so I had to add these paths to get my debugger to work.
Debug!
Once that is setup, select your configuration from the drop down in the debugging tool bar and click the bug icon (you can also use the Run menu) to start the debugger listening. This is similar to the default Telephone Button (circled in yellow), but it tells PHPStorm to use your new configuration.
Now simply run behat like you normally would from your server and your debugger should connect and stop on any breakpoints you've placed.
If you're having doubts about if it's working or not, try toggling the "Break on First Line" in the Run menu, as this should make the debugger break immediately when you run behat (in the bin/behat file)