This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Product Version = NetBeans IDE Dev (Build 201508100002) Also tried on 8.0.2 Operating System = Linux version 3.16.0-38-generic running on amd64 Java; VM; Vendor = 1.8.0_51 Runtime = Java HotSpot(TM) 64-Bit Server VM 25.51-b03 Background: Debug single unit test in cli mode Behavior: 1. When I click "Debug Project" (cli mode) it runs selected test 2. Status bar hangs on "Waiting for connection" even when tests finished 3. "Debug Project" icon is active, but clicking it does nothing To re-run "Debug Project" I have to restart IDE.
Created attachment 155284 [details] IDE log
Does it happen to you with all your PHP projects? Or do you have some other PHP projects where debugger works as expected? Anyway, I don't see any error related to PHP debugger in thye attached IDE log. But there are some other errors there, so please could you try a clean userdir [1]? Simply reopen this issue, thanks. [1] http://wiki.netbeans.org/FaqAlternateUserdir
Created attachment 156143 [details] Example project file Tried with dev builds and 8.1 beta. Tried to clean user dir, and did not import settings, still no luck. Tried to cancel "Waiting for connection", it dissapeared after clicking "x". It didn't help. Every project I tried does not work as expected. I can run tests only once, then I have to restart netbeans. If it helps, I was developing on windows previously, perhaps some windows leftovers are in project file? I attached example project. No deps, so test results in fatal error, anyway cannot re-run test. What bugs me is status bar message "Waiting for connection" like if it was waiting for remote debug, through it's cli debug, should it even show up?
Found a solution for this, it turned out that for CLI debugging, xdebug still needs to have remote enabled: xdebug.remote_enable=1 Except above default configuration is used. Perhaps there should be some timeout for cli debugging? And some error message to give clues on why failed? Summary: It hangs on "Waiting for connection" indefinitelly when "xdebug.remote_enable=1" is not set. When clicked "Stop" button it stops, but could not start debugging again. Clicking again "Debug project" has no effect at all. Currently tried at build 201510060002
Story: xdebug session had been run for a project from cli and called another project (curl-call, exmpl). If breakpoint set at the second project (remote called), it was missed. In another IDE: I can resetting the debug session without stop listening to the xdebug port (session rerun each remote or cli call).
(In reply to sam002 from comment #5) > Story: xdebug session had been run for a project from cli and called another > project (curl-call, exmpl). > If breakpoint set at the second project (remote called), it was missed. > > In another IDE: I can resetting the debug session without stop listening to > the xdebug port (session rerun each remote or cli call). This seems to me to be a different issue, not related to this one. Feel free to report it as a new bug. Thanks.
(In reply to Tomas Mysik from comment #6) > (In reply to sam002 from comment #5) > > Story: xdebug session had been run for a project from cli and called another > > project (curl-call, exmpl). > > If breakpoint set at the second project (remote called), it was missed. > > > > In another IDE: I can resetting the debug session without stop listening to > > the xdebug port (session rerun each remote or cli call). > > This seems to me to be a different issue, not related to this one. Feel free > to report it as a new bug. > > Thanks. Ok, new issue: https://netbeans.org/bugzilla/show_bug.cgi?id=256016
Perhaps, simply, it is reproducible with the following steps: 1. Disable xdebug : e.g. comment out lines of the xdebug.ini file 2. Create/Open a php project 3. Create/Opne a php file (index.php) e.g. <?php echo "hello"; // set the break point 4. Set Script(run in command line) to Run Configuration of the project properties 5. Run Debug Project Tomas, I found out the cause. The module is waiting in the SessionId.isInitialized() even if the debugging is canceled. So I think that we have to let the SessionId know that it is canceled. But I'm not sure yet. Could you look at it when you can make time? BTW, the waiting progress bar is shown because the ServerSocket cannot accept in the ServerThread.run() (looping with SocketTimeoutException). Thanks.
Sorry, missing steps: 6. Cancel Running Task (Click [x] for "Waiting For Connection") 7. Run Debug Project again
Fixed. http://hg.netbeans.org/web-main/rev/386dd5c3e7c5 Thanks.
Integrated into 'main-silver', will be available in build *201704150002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/386dd5c3e7c5 User: Junichi Yamamoto <junichi11@netbeans.org> Log: #254298 - Could not reinitiate cli debug session
Thanks a lot, Junichi!
Thank You, now behavior is correct, and there is information of what could be wrong, good. Verified at build 201704180002
You are welcome :)