Eclipse Che Debug the Extension - eclipse-che

I want to define my own extension for that I am learning existing extension plugin from https://github.com/eclipse/che/tree/master/samples/sample-plugin-json.
How to debug the Eclipse Che Plugin from Eclipse?
I can attach remote debugger to workspace agent server and port but debug pointer doesn't get hit, any pointer will be helpful?

As Che deploy the extension to wsagent. For every wsagent we get new port.
If we switch to "Operation Perspective", we can see the wsagent debug port. From IDE/eclipse, we need to remotely connect to this port.
We need to listent to that port in IDE:
By following above steps, our extension gets the call.

Related

How do you debug react-native when it is running on device?

How do you debug react-native when it is running on device ?
Figured our React Native debugging for Android. Steps to for someone struggling with this -
Launch your RN App
Shake device
Select "Dev Settings"
Select "Debug server host & port for device" Put in your system's IP address.
Shake device
Select "Debug JS remotely"
Chrome will open a new tab with the address "http://localhost:8081/debugger-ui"
If this doesn't happen, check your port and open a new tab and enter the above address with your port number.
Open #Chrome DevTools (Cmd+Alt+I on #MacOSX)
Select the Console Tab
Shake Device
Select "Reload"
View all your console logs or use "debugger;" in your JS for breakpoint debugging.
You have two options:
Debug remotely
iOS: Cmd + ctrl + z to open menu and select "Debug remotely"
Android: Cmd + M to open menu and select "Debug remotely"
Or run one of these commands:
react-native log-ios
react-native log-android
There are little hack in here for IOS.
In XCode open AppDelegate.m from project folder, comment the line with jsCodeLocation declaration and add near it something like this:
jsCodeLocation = [NSURL URLWithString:#"http://%YOUR_PC_IP%:8081/index.ios.bundle?platform=ios&dev=true"];
, where %YOUR_PC_IP% is IP of your dev machine on local net.
Then open project named RCTWebSocket wich located in Libraries folder and then open from this project file RCTWebSocketProjectExecutor.m. Next, comment the line with host declaration, then add near it something like that:
host = #"%YOUR_PC_IP%";
Almost done. Run app on your device with XCode and make sure that your IPhone can see your develop machin via internet.
After it launches make sure that node server is running (command "react-native -- --start" in root project folder) and open via chrome this page: http://localhost:8081/debugger-ui . Plus, option Debug JS Remotely must be enabled in your app on your IPhone. (Shake action, then tap in opened menu Debug JS Remotely, that is it.)
Now open dev console and have happy debugging.
2 options exist:
Remote debug: this would go over network, so it can be laggy.
Run app on device (install it whilst its plugged in)
Shake device (Android devices need to be vigorously shaken)
Press settings on the dev menu, and under Debugging, press Debug server host and port for device
Enter your debug server's IP address and port (usually 8081 unless you changed your settings of the debug server), e.g. 255.255.255.255:8081. Your ip address is the local IP address that your computer has. Ensure the device is on the same network. For mac users, open System Preferences → Network → Wifi → Under Status: connected, there is an IP address, use that.
You can unplug the device
Ensure debug mode is on (Shake device vigorously again, press Debug)
Wired debug: relatively better for slow connections
Install app on phone
If android, set up port forwarding with adb reverse tcp:8081 tcp:8081 and if iOS, follow the steps from RN docs)
Enable debug on device
If you are working on Visual Studio Code then you can install React Native Tools extension (provided by Microsoft) and debug your app like any other IDE.
Read all steps in detail in my this answer.

Xdebug PhpStorm: Waiting for incoming connection with ide key

I've searched a lot for this problem when debugging php using PhpStorm with xdebug, I found 3 or 4 links discussing this problem, but none of them are useful.My Xdebug's version is 2.2.3, and PhpStorm'version is 6.03. I could debug every line step by step except this one
$this->link = mysql_connect($this->dbserver, $this->dbuser, $this->dbpass);
PhpStorm shows this error:Waiting for incoming connection with ide key "14841".
Here are my xdebug configuration:
zend_extension="/usr/lib/xdebug.so"
xdebug.remote_autostart=1
xdebug.show_local_vars=1
xdebug.dump.GET=*
xdebug.dump.POST=*
xdebug.dump.SERVER=*
xdebug.auto_trace=On
; default trace output directory /tmp
xdebug.collect_vars = On
xdebug.trace_output_dir=/tmp
xdebug.collect_params=4
xdebug.collect_return=On
xdebug.profiler_enable=Off
; default trace output directory /tmp
;xdebug.profiler_output_dir=/tmp
;xdebug.profiler_enable_trigger=On
;test.php?XDEBUG_PROFILE
xdebug.remote_enable=On
xdebug.remote_host="localhost"
xdebug.remote_port=9001
xdebug.remote_handler="dbgp"
xdebug.remote_log = "/tmp"
xdebug.remote_connect_back=1
xdebug.idekey=PHPStorm
I add these lines " xdebug.remote_connect_back=1
xdebug.idekey=PHPStorm ", also resisted ide ,it is still the same
i assure that the three parameters are correct.
For me, the debugger never connected and I saw the Waiting for incoming connection with ide key message because I set set my Server configuration to port 9000. This should be set to port 80 (or whatever other port the webserver is listening to! This was confusing to me because it's right next to the Debugger dropdown and I figured it was to set the Xdebug port.
The Debug port is configured in Settings->Languagues & Frameworks->PHP->Debug. Set this to 9000 or whatever you configured php.ini to be.
Just a note, I was using IntelliJ IDEA, but it's all the jetbrains platform.
You wrote:
PhpStorm shows this error:Waiting for incoming connection with ide key "14841".
But you use:
xdebug.idekey=PHPStorm
Those ide keys need to match. PHP Storm is a bit funny about it.
But then you also said:
I could debug every line step by step except this one
$this->link = mysql_connect($this->dbserver, $this->dbuser, $this->dbpass);
How are they different? Is there different behaviour, or just doesn't it stop?
I had a similar issue. In my case it was caused by misunderstanding PHPStorm/IntelliJ PHP debugging modes. There are two modes:
"Local" PHP debugging
"Remote" PHP debugging
When you use the "local" debugging, IDE key is autogenerated
This means, that primitive bookmarklets, created at http://www.jetbrains.com/phpstorm/marklets/ will not work in local mode: the bookmarklet contains a hardcoded IDE key, but PHPStorm will generate a random one!
The solution is to enable "Remote" PHP debugging mode (it is currently called "PHP Remote Debug") in "Run/Debug Configurations" and set the IDE key in the right pane of the create launch configuration.
"DBGp proxy" in global settings is probably not what you want; create a "Remote" debug config and set the IDE key there.
I was having a similar issue in a local installation.
I fixed it by unselecting the setting: Use Path Mappings
Found under the Settings > Languages & Frameworks > PHP > Servers

Issuing debugging with gdbserver

I am using the gdbserver plugin in Netbeans trying to attach to a remote debugging session. However I get an error: "inappropriate ioctl for device." I am able to remote debug by launching gdb from the terminal but I would like to be able to use Netbeans for debugging.
I had this problem too. I was able to fix it by running the "debugger" "Using GDB Debugger" on my project. It failed, because my project doesn't run on this machine. But after doing this, I was able to successfully run the "debugger" "gdbserver".

Cannot access Jenkins

I have installed Jenkins on my Ubuntu 12.04 desktop machine using this guide:
https://wiki.jenkins-ci.org/display/JENKINS/Installing+Jenkins+on+Ubuntu
I also needed to follow this guide:
http://aslamnajeebdeen.com/blog/how-to-fix-apache-could-not-reliably-determine-the-servers-fully-qualified-domain-name-using-127011-for-servername-error-on-ubuntu
From my other machine (mac laptop) I now try to access Jenkins through safari:
http://192.168.1.100/jenkins
where 192.168.1.100 is the ip address of my desktop machine but I get an Error 404. I have also tried:
http://jenkins
but nothing happens. What am I missing?
The Jenkins service is running on my desktop PC:
service jenkins status
...
Jenkins Continuous Integration Server is running with the pid 3713
And if I enter: localhost:8080 in a browser on my desktop pc I get the jenkins web interface.
PROBLEM SOLVED:
I have followed this guide:
http://www.zzorn.net/2009/11/setting-up-hudson-on-port-80-on-debian.html
and it now works.
I had the same problem but not using Apache, rather only Jenkins on Ubuntu
I solved it by replacing HTTP_HOST=127.0.0.1 with HTTP_HOST=0.0.0.0 on /etc/default/jenkins
Jenkins is set to listen on port 8080 by default,
so you should point your browser to:
http://localhost:8080/
(or, in your case: http://192.168.1.100:8080/ )
EDIT:
If still not able to connect, you may wish to check your firewall settings.

Using Xdebug with PhpDesigner

I want to use Xdebug tool for profiling code execution speed, memory usage of my php application.
My application frame work is codeigniter and IDE is PhpDesigner.
i followed the instruction in phpDesigner manual PhpDesigner xdebug configuration
But when i debug using debug option f9 in PhpDesigner menu it shows Php5.dll file is missing.
How to debug my php script using xdebug and phpDesigner
I'm using external debugging for projects on my local server.
To debug file you just need to open it in IDE and run script from browser.
Look at this tutorial http://wiki.mpsoftware.dk/doku.php/tutorials/debug_php_scripts_from_your_browser_with_phpdesigner_7_external_debugging

Resources