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.

Bug 146401 - Start debug session without calling file in browser
Summary: Start debug session without calling file in browser
Status: RESOLVED WORKSFORME
Alias: None
Product: php
Classification: Unclassified
Component: Debugger (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker with 4 votes (vote)
Assignee: Ondrej Brejla
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-09-06 12:20 UTC by jkuehn
Modified: 2012-04-10 12:24 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
Extended options dialog (8.84 KB, image/png)
2008-09-08 22:43 UTC, jkuehn
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jkuehn 2008-09-06 12:20:30 UTC
Currently, if you click on "Debug Project" or "Debug" on a selected file, then the file is opened in a browser and
xdebug is triggered to connect to netbeans for debugging. Enhancement request: There should be an option to just start
the debugging session, without the browser call.

Since all major php frameworks are using the front controller pattern
(http://www.martinfowler.com/eaaCatalog/frontController.html) you usually debug URLs and not files anymore. It would be
much more developer friendly, if you could just make netbeans start listening on the debug port and trigger debugging
manually while testing urls (ie using a firefox extension like xdebug helper
https://addons.mozilla.org/de/firefox/addon/3960). 

It would be like the nice function "debug next request/page" from the zend studio toolbar.
Comment 1 rmatous 2008-09-06 16:48:07 UTC
great, thanks for this report. Will be evaluated, but hardly implemented into 6.5 release because its too late. Post 6.5
release should have better support for frameworks, so good to know about it.
Comment 2 jkuehn 2008-09-08 22:42:19 UTC
Thank you for reviewing. Implementing some framework specifics might be a lot of work. Maybe one quick-solution is
possible for the 6.5 release:

When starting a debug session an options window pops up, asking about client side debugging settings. We could put an
option like "Also open file in browser" into this window (see attachment). A developer then can avoid the browser call
and append "?XDEBUG_SESSION_START=netbeans-xdebug" to urls manually or use xdebug helper to trigger debugging.

Currently the script is always executed upon a click on the debug button, without any parameters, which may lead to
unwanted results, ie the unparameterized code may fill cache or make remote requests. With this quick-fix (i dont really
know if its really a quick/small one), one can avoid the execution of unparameterized code.

So just the option whether to open the script in browser window or not would do it
Comment 3 jkuehn 2008-09-08 22:43:42 UTC
Created attachment 69354 [details]
Extended options dialog
Comment 4 rmatous 2008-10-15 14:46:22 UTC
Something like this is suggested for 7.0
Comment 5 ithinkihaveacat 2009-10-12 11:44:14 UTC
It is possible to launch get NetBeans to launch a debug session given a URL only, but it's rather difficult to figure out 
how to do so given the fixation of the NetBeans UI on debugging individual files.  (If you have a single URL you want to 
debug, what do you put in the "Project URL", "Index File" and "Arguments" fields?)

I realise this doesn't help with the problem of launching a debug process from the browser, but if you want to "debug by 
URL" then, as described in bug 171013, you should use Project Properties > Run Configuration > Advanced... > Debug URL > 
Ask Every Time (last URLs are remembered).
Comment 6 Filip Zamboj 2010-09-15 12:26:34 UTC
batch reassigning
Comment 7 miked_187 2012-01-24 16:11:11 UTC
going thru the list trying to see if the bug I want to report with 7.1 is on the list, and this issue still shows as "New", know its old but it should be closed.

OP wants "There should be an option to just start the debugging session, without the browser call."

here you go:

right click on your project in the project explorer, select properties
select run configuration
click Advanced button
in the Debug section in the top area of the window select Do Not Open Web Browser
Comment 8 Ondrej Brejla 2012-04-10 12:24:52 UTC
It has been implemented few versions ago.