php unit-testing, eclipse PDT, makegood, xdebug - eclipse

Is there any way to force makegood stop on breakpoints in order to inspect vars,etc ?
I installed eclipse indigo 3.7 + PDT tools, secondly I configured xdebug and it works during plain debug. at last I installed makegood from marketplace and enabled it's feature "Debug Test" and yet it doesn't stop at breakpoints instead it shows me report, which is correct, plus some buggy lines like:
/mnt/public/midnight/www/sandbox/makegood/Tests/makeGoodTest.php:11
/home/midnight/Software/eclipse/plugins/com.piece_framework.makegood.stagehand_testrunner_1.9.0.v201201241509/resources/php/PEAR/Stagehand/TestRunner/Runner/PHPUnitRunner.php:112
/home/midnight/Software/eclipse/plugins/com.piece_framework.makegood.stagehand_testrunner_1.9.0.v201201241509/resources/php/PEAR/Stagehand/TestRunner/TestRunner.php:79
/home/midnight/Software/eclipse/plugins/com.piece_framework.makegood.stagehand_testrunner_1.9.0.v201201241509/resources/php/PEAR/Stagehand/TestRunner/TestRunnerCLIController.php:325
/home/midnight/Software/eclipse/plugins/com.piece_framework.makegood.stagehand_testrunner_1.9.0.v201201241509/resources/php/PEAR/Stagehand/TestRunner/TestRunnerCLIController.php:175
/home/midnight/Software/eclipse/plugins/com.piece_framework.makegood.stagehand_testrunner_1.9.0.v201201241509/resources/php/PEAR/Stagehand/CLIController.php:101
/home/midnight/Software/eclipse/plugins/com.piece_framework.makegood.stagehand_testrunner_1.9.0.v201201241509/resources/php/bin/phpunitrunner.php:80
My /etc/php5/conf.d/xdebug.ini:
zend_extension="/usr/lib/php5/20090626/xdebug.so"
xdebug.profiler_enable = Off
xdebug.default_enable = On
xdebug.remote_enable = On

I'm sorry but I don't use makegood but I do know that xdebug has a function you can call from the code to trigger a break.
xdebug_break();
bool xdebug_break()
Emits a breakpoint to the debug client. This
function makes the debugger break on the specific line as if a normal
file/line breakpoint was set on this line.
I hope this will be of some help.

There is a button "Debug Test" for this in the MakeGood View.
To use if configure Eclipse Debuging using e.g. XDebug and then set a breakpoint and run your tests.
See https://wiki.eclipse.org/Debugging_using_XDebug

Related

Debugging step buttons disabled in Eclipse Oxygen

I have upgraded Eclipse to Oxygen, with Scala and Python added. I noticed that when programming in Java, the step commands of the debugger remain disabled.
I can run the debugger, and it will run until it hits a breakpoint, but then i cannot step in or over. I can only stop the (local) VM.
Any thoughts?
In my case increasing the "debug timeout" value resolved the problem. Thanks to #Shahbaz Ahmad comment.
Preferences >> Debug >> Connection Timeout
If you have all code in main function then put a breakpoint at main function as well.
And if you have multiple functions, breakpoint on methods as well ( if you have breakpoint inside that method).
Basically, put a breakpoint on the function in which you have added breakpoints.

Enabling breakpoints in goclipse

I'm trying to get debugging of go programs working in eclipse Luna with goclipse v0.11.0 on OS-X 10.9.5. I am using GNU gdb (GDB) 7.9.1 from brew, and go1.4.2.
I successfully installed and code-signed gdb using instructions here:
http://ntraft.com/installing-gdb-on-os-x-mavericks/
I am building my go program with -gcflags "-N -l" and I can successfully debug it at the command line, including setting breakpoints at go functions and stepping through them with the gdb command line, with source appearing as it should.
However, in goclipse I cannot set a breakpoint at all, because the 'toggle breakpoint' item on the menu is greyed out, and the 'Breakpoint Types' list says 'none available'.
If I select 'Stop on Startup at' 'main', then I can step through assembler, which is unhelpful, but proves gdb is being used.
If I keep the above option set, wait until the program hits the main breakpoint, and type (at the gdb console within eclipse) break main.foo, then cont, then a breakpoint is set in the right place, and I can step through things in the Eclipse IDE. Thus it appears the only issue is setting the breakpoints in the IDE.
The go program concerned is a single file and it works under command line gdb, and I have deleted the binary and started afresh, so this is not a 'need a rebuild' issue.
Related question: How to debug Go programs using GoClipse? however the two answers there are 'disable Stop on Startup' (which makes no difference here), and ensuring -gcflags "-N -l" is given (which makes no difference).
Screenshot:
Any ideas?

how to debug using basheclipse

"Basheclipse installation issue" does not address my issue and thats why I ask a new question.
Hi, I am running Eclipse Luna on Windows 7
I followed all the instructions on http://sourceforge.net/projects/basheclipse/files/
I have never worked on Eclipse. I am stuck on 7th step(pasted below)
7) Switch to The Debug perspective. Start the debugging session. Launch "script.sh" from bash shell.
Please help me do this.
When I used the debug button it says "Launching new configuration has encountered an error Bash is already running."
I tried the run button and it says "Couldnt find Interpreters. Do you want to configure interpreters now?"
edit:ok the debug perspective is on now.
edit:ok looks like a bug
http://sourceforge.net/p/shelled/discussion/399718/thread/6272268c/
any way to circumvent this?
"Launching new configuration has encountered an error Bash is already running."
--> just relaunch your eclipse and then it will work without any problem.
"Anyone tried installing Eclipse and debugging on a Linux machine?"
--> yes. eclipse neon and jdk 8.
You can follow my tutorial at http://dietrichschroff.blogspot.de/2017/07/bash-enabling-eclipse-for-bash_14.html

pydev debugging: how to make the debug session automatically stop at the first executable line?

Can I make debug sessions in Aptana (with pydev) stop automatically on the first executable line, as if I had set a breakpoint there?
Not currently. Please open a feature request for that in the PyDev tracker (links: http://pydev.org/about.html)

Eclipse Helios not stopping at breakpoints

I recently upgraded from Eclipse Galileo to Helios. Helios stops at breakpoints ONLY when debugging "as a PHP Script", but not when debugging "as a Web Page".
When debugging as a web page, it looks like the correct debug query string to start a debug session is getting tacked on to the url, like so:
http://localhost/hello.php?XDEBUG_SESSION_START=ECLIPSE_DBGP &KEY=129798139020511
but elipse does not stop at the breakpoints. It just zooms thru the code and displays the output in the browser.
This is my xdebug configuration in php.ini that works for Galileo, but is not working for Helios: (click here to see my entire xdebug config settings)
;extension=xdebug.so <-- is this needed?
zend_extension=" /Applications/MAMP/bin/php5.3/lib/php/extensions/no-debug-no n-zts-20090626/xdebug.so "
xdebug.remote_enable=on
xdebug.remote_autostart=off
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.idekey=
; to enable remote debugging
zend_debugger.allow_hosts=127.0.0.1/32
zend_debugger.expose_remotely=always
Can you post your xdebug configuration that works for Helios? If possible, can you share the xdebug portion of your phpinfo() output? Would like to compare settings of an xdebug configuration that works on Helios with what I have.
I am having the exact same issue. I did find some bug reports about breakpoints in Galileo not being able to be used in Helios. I can get Helios to stop on breakpoints at times, but I have to delete all my breakpoints and then start debugging, and only after that add a breakpoint. Needless to say this is very annoying. I'll try and find the link that I saw and add it to here.
For now I've gone back to Galileo.
Malks.
I'm using:
Ubuntu 14.04 64 bits
Eclipse Luna
Nginx
PHP Fpm (via socket)
I solved this debugging problem disabling IPV6
Edit /etc/sysctl.conf and add the following lines:
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
Then reboot or sudo sysctl -p