<![CDATA[ [SOLVED] Debugging custom manager page in NetBeans - breakpoint doesn't work. - My Forums]]> https://forums.modx.com/thread/?thread=45123 <![CDATA[Re: [SOLVED] Debugging custom manager page in NetBeans - breakpoint doesn't work.]]> https://forums.modx.com/thread/45123/solved-debugging-custom-manager-page-in-netbeans---breakpoint-doesn-t-work#dis-post-259664 Quote from: javadecaf at Jun 29, 2011, 07:06 PM

As a side note, my program execution is still pausing at places where I haven’t set breakpoints. This isn’t a major problem, since I can just hit F5 until I get to the real breakpoint(s), but I wouldn’t mind fixing it if anyone has a clue what might be happening.
Well, I just resolved this one, too, so in the interests of complete documentation, here’s the fix. In NetBeans, go to Tools -> Options, choose the PHP tab, and under "Debugging," uncheck "Stop at first line".

"And they all lived happily ever after!" (or until the next bug, anyway) grin]]>
javadecaf Jun 29, 2011, 03:53 PM https://forums.modx.com/thread/45123/solved-debugging-custom-manager-page-in-netbeans---breakpoint-doesn-t-work#dis-post-259664
<![CDATA[Re: Debugging custom manager page in NetBeans - breakpoint doesn't work.]]> https://forums.modx.com/thread/45123/solved-debugging-custom-manager-page-in-netbeans---breakpoint-doesn-t-work#dis-post-259663 I finally found the solution (with some help from robinK via PM). I probably should have mentioned in the initial post that I’m using remote debugging, my IDE being on a different machine from my local webserver. In NetBeans, this may (and in my case, does) require that you specify Path Mapping for the project, so it knows where to find the files for debugging. To do this, go to Project Properties -> Run Configuration -> Advanced, enter the server path for your project (e.g. /var/www/mywebsite.com) and click the little gray button to navigate to the project folder (e.g., \\mywebserver\mywebsite.com). Save your configuration, and everything should work together nicely.

As a side note, my program execution is still pausing at places where I haven’t set breakpoints. This isn’t a major problem, since I can just hit F5 until I get to the real breakpoint(s), but I wouldn’t mind fixing it if anyone has a clue what might be happening.]]>
javadecaf Jun 29, 2011, 02:06 PM https://forums.modx.com/thread/45123/solved-debugging-custom-manager-page-in-netbeans---breakpoint-doesn-t-work#dis-post-259663
<![CDATA[Re: Debugging custom manager page in NetBeans - breakpoint doesn't work.]]> https://forums.modx.com/thread/45123/solved-debugging-custom-manager-page-in-netbeans---breakpoint-doesn-t-work#dis-post-259662 javadecaf Jun 29, 2011, 09:04 AM https://forums.modx.com/thread/45123/solved-debugging-custom-manager-page-in-netbeans---breakpoint-doesn-t-work#dis-post-259662 <![CDATA[Re: Debugging custom manager page in NetBeans - breakpoint doesn't work.]]> https://forums.modx.com/thread/45123/solved-debugging-custom-manager-page-in-netbeans---breakpoint-doesn-t-work#dis-post-259661 opengeek Jun 29, 2011, 08:56 AM https://forums.modx.com/thread/45123/solved-debugging-custom-manager-page-in-netbeans---breakpoint-doesn-t-work#dis-post-259661 <![CDATA[Re: Debugging custom manager page in NetBeans - breakpoint doesn't work.]]> https://forums.modx.com/thread/45123/solved-debugging-custom-manager-page-in-netbeans---breakpoint-doesn-t-work#dis-post-259660 Quote from: shamblett at Jun 29, 2011, 04:02 AM

Try using the ’debug file’ option rather than the ’debug main project’ one, also select ’do not open web browser’ in the advanced web configuration’ options.
Thanks, but I’m already doing both those things.]]>
javadecaf Jun 29, 2011, 08:11 AM https://forums.modx.com/thread/45123/solved-debugging-custom-manager-page-in-netbeans---breakpoint-doesn-t-work#dis-post-259660
<![CDATA[Re: Debugging custom manager page in NetBeans - breakpoint doesn't work.]]> https://forums.modx.com/thread/45123/solved-debugging-custom-manager-page-in-netbeans---breakpoint-doesn-t-work#dis-post-259659 shamblett Jun 28, 2011, 11:02 PM https://forums.modx.com/thread/45123/solved-debugging-custom-manager-page-in-netbeans---breakpoint-doesn-t-work#dis-post-259659 <![CDATA[ [SOLVED] Debugging custom manager page in NetBeans - breakpoint doesn't work.]]> https://forums.modx.com/thread/45123/solved-debugging-custom-manager-page-in-netbeans---breakpoint-doesn-t-work#dis-post-259658 tutorial and I’m having some trouble with it. For testing purposes, I trimmed index.php down to just 2 lines of code:
$output = "Houston, we have a problem.";
return $output;

I set a breakpoint on the first line, and fire up my debugger (xDebug, which works great on front-end pages). Usually, a green arrow would pop up on the breakpoint, but on this page, I get no green arrow, and no indication of what line will execute next. The only way I can tell where I am is to look at the call stack, which gives the current function as "core/components/mycmp/index.php.{main}:29]".

Does anyone understand this syntax? My index.php has only 2 lines - why is it referring to line 29? (Incidentally, it has started on that number every time, even before I reduced the file to 2 lines). What does {main} refer to? And why is my breakpoint not working? I can hit F5 until the page loads completely in the browser, and the result is as expected ("Houston, we have a problem" is displayed on the screen) but execution never halts on breakpoint.

Can anybody help me out here? embarrassed

(BTW, on forum posts, I know the syntax for code and PHP syntax highlighting, but I can’t seem to combine the two. Does anyone know how to do that?)]]>
javadecaf Jun 28, 2011, 09:42 PM https://forums.modx.com/thread/45123/solved-debugging-custom-manager-page-in-netbeans---breakpoint-doesn-t-work#dis-post-259658