Discussion:
Can't tell which is the current line for the debugger
mschechtman
2010-08-13 06:08:42 UTC
Permalink
I'm running NetBeans on a Mac doing PHP development.

I know the debugger is working because I can view variable values. And I know that I can set breakpoints and step through code because the line number in the call stack changes when I step.

But there is no indication on the screen where the debugger currently is. The current text line is light blue when I'm editing. But the current debugger line has no visual cue.

I understand the line the debugger is ready to execute is supposed to be green. But I see no indication at all, and I can't find where to set it.

Thanks so much!
Marty
Mark Wade
2010-08-13 11:32:43 UTC
Permalink
Post by mschechtman
I'm running NetBeans on a Mac doing PHP development.
I know the debugger is working because I can view variable values.
And I know that I can set breakpoints and step through code because
the line number in the call stack changes when I step.
But there is no indication on the screen where the debugger
currently is. The current text line is light blue when I'm
editing. But the current debugger line has no visual cue.
I understand the line the debugger is ready to execute is supposed
to be green. But I see no indication at all, and I can't find where
to set it.
Thanks so much!
Marty
I don't know why the highlighting isn't working for you but there are
settings in NetBeans -> Preferences -> Fonts and Colors -> Annotations

The problem is there are quite a few entries that look as if they
would apply. I'm not sure which one, or more than one, need to be set
or why you need to set it.

Mark Wade
***@optonline.net
mschechtman
2010-08-13 17:01:15 UTC
Permalink
Hi Mark,

Thanks very much for your response.

I can't find anything appropriate in annotations. It seems to me current debug line should be an entry in the highlights section. That's where Highlight Caret Row is. That's the entry for highlighting the current row for the editor.

Preferences -> Fonts & Colors -> Highlighting

But I can't find anything appropriate for Highlight Debug Line

Marty
Mark Wade
2010-08-13 19:09:50 UTC
Permalink
Post by mschechtman
I can't find anything appropriate in annotations.
It's there, on my Mac running 6.8 anyway. The two entries you're
looking for are "Current Program Counter" and the second "Program
Counter and Breakpoint" entry, the first entry with that title refers
to an invalid breakpoint.

I verified that here by changing their values, they both default to
RGB 189,230,170.

But there are others:

There are five entries for "Current Program Counter in Expression"
which all default to 233,255,230 which on my display is almost white.
I don't do PHP but maybe this applies to that? Try changing those to
something unmistakeable and step through the debugger.

Also there are:

"Current Program Counter and other thread"
"Current Program Counter and other thread with a breakpoint"

Then there are a bunch toward the bottom of the list. The entry
titles are duplicated and only distinguishable by their icons.

The answer lies there.

Mark Wade
***@optonline.net
mschechtman
2010-08-14 15:26:55 UTC
Permalink
Well Mark,

I don't even have Program Counter and Breakpoint on my viewscope. I bet that is the source of my problem.

Here are the choices I have under Annotations related to Current

Current Program Counter
Current Program Counter In Expression
Current Program Counter In Expression + Conditional Breakpoint
Current Program Counter In Expression + Conditional Breakpoint
Current Program Counter In Expression + Disabled Breakpoint
Current Program Counter In Expression + Disabled Conditional Breakpoint

I set them all to Wave Underlined: Yellow. Still no indication of which line the debugger is working on.

I changed the Breakpoint annotation to Wave Underlined: Yellow too. And the text is underlined with a wavy yellow line, just as advertised. So if one of those Current Program options was the one I need, it too should have been underlined.

Perhaps I should try to find NetBeans 6.8.

Thanks,
Marty
Mark Wade
2010-08-14 17:14:56 UTC
Permalink
Post by mschechtman
Well Mark,
I don't even have Program Counter and Breakpoint on my viewscope. I
bet that is the source of my problem.
Here are the choices I have under Annotations related to Current
Current Program Counter
Current Program Counter In Expression
Current Program Counter In Expression + Conditional Breakpoint
Current Program Counter In Expression + Conditional Breakpoint
Current Program Counter In Expression + Disabled Breakpoint
Current Program Counter In Expression + Disabled Conditional
Breakpoint
I set them all to Wave Underlined: Yellow. Still no indication of
which line the debugger is working on.
I changed the Breakpoint annotation to Wave Underlined: Yellow too.
And the text is underlined with a wavy yellow line, just as
advertised. So if one of those Current Program options was the one
I need, it too should have been underlined.
Perhaps I should try to find NetBeans 6.8.
Thanks,
Marty
Funny you should have just posted this and my feed from the mailing
list has been very erratic, sometimes I don't get anything for days.
Anyway, this all made me curious so I just finished downloading MAMP
and installing it following this link:

http://netbeans.org/kb/docs/php/configure-php-environment-mac-os.html#installMamp

It said I had to download, compile and install xdebug but I found that
wasn't necessary, it was already installed with MAMP, but I did have
to configure php.ini. After going through that I can see how to hook
up the existing installations of php apache and mysql that ship with
macosx.

But, anyway, the debugging works here. The highlighting works as I
step through the code.

All I can offer now is my setup:

Product Version: NetBeans IDE 6.8 (Build 200912041610)
Java: 1.5.0_24; Java HotSpot(TM) Client VM 1.5.0_24-149
System: Mac OS X version 10.5.8 running on ppc; MacRoman; en_US (nb)

The NetBeans archives are here:

http://www.netbeans.info/downloads/dev.php

and 6.8 release is here:

http://netbeans.org/downloads/6.8/index.html

I don't know how to get the version from php, I try to access it and
get "Permission Denied" but the directory structure says it is 5.3

Two more links in case they can be of any use:

http://netbeans.org/kb/docs/php/configure-php-environment-mac-os.html#installMamp
http://netbeans.org/kb/docs/php/debugging.html

If you do get it working with 6.8, let us know. You can have multiple
versions installed and in use on a machine.

Mark Wade
***@optonline.net
mschechtman
2010-08-14 17:08:52 UTC
Permalink
New information about the missing debugger highlight!

Turns out that I'm debugging remotely. I'm using path mapping to connect the remote file system to mine.

I set a breakpoint on a line in a file on my machine and execution stops there. But what is being reported in the call stack is the file on the remote machine! Makes sense really, that's where execution is.

Doesn't explain why the current debug line isn't being highlighted, but it is new information.

Marty
complicity
2010-08-14 20:29:30 UTC
Permalink
My issue might be different to the original poster's, as the debugger doesnt stop at breakpoints for me, I have posted a seperate topic here (http://forums.netbeans.org/viewtopic.php?t=30582).

Anyhow I tried to download the 6.8 version of netbeans and it hasn't resolved my issue at all.
You can get your php version by running php -v in the cmd prompt...
Mark Wade
2010-08-15 00:05:06 UTC
Permalink
Post by complicity
My issue might be different to the original poster's, as the
debugger doesnt stop at breakpoints for me, I have posted a seperate
topic here (http://forums.netbeans.org/viewtopic.php?t=30582).
Anyhow I tried to download the 6.8 version of netbeans and it hasn't
resolved my issue at all.
You can get your php version by running php -v in the cmd prompt...
People have posted having problems with java version 1.6.0_21 and
fixed them by reverting to 1.6.0_20.
Post by complicity
You can get your php version by running php -v in the cmd prompt...
That works for the php installation at /usr/bin/php but the one
installed with MAMP at /Applications/MAMP/bin/php5.3/bin/php yields
"Permission Denied".

Now that I just typed that I checked and Applications/MAMP/bin/php5.3/
bin/php execute permissions are not set. I set the permissions and it
works. I'm hitting the send button anyway.

Mark Wade
***@optonline.net
mschechtman
2010-08-15 01:47:59 UTC
Permalink
Guess what. The issue I'm having is a known NetBeans bug.

I'm having the problem because I'm trying to do remote debugging. For me, the website I'm debugging against is running FreeBSD, and I'm running NetBeans on a Mac. The very definition of remote debugging. They're communicating just fine during the debug session in that I can set breakpoints and step through code.

But there is no visual cue as to what line the debugger is ready to execute.

The issue has already been reported as a NetBeans bug here (https://netbeans.org/bugzilla/show_bug.cgi?id=163958) and here (https://netbeans.org/bugzilla/show_bug.cgi?id=188844) and maybe elsewhere.

I'm going to try older versions and see if I can get this resolved for myself.

Mark, you have gone above and beyond to help me with this. I want you to know how much I appreciate it!

Marty
complicity
2010-08-15 12:46:46 UTC
Permalink
Ok I managed to resolve my issue, see here (http://forums.netbeans.org/viewtopic.php?p=82735#82735)

Basically I was being stupid and I hadn't correctly configured the path mapping, although I have no idea why this meant that the debugger only half worked...
mschechtman
2010-08-21 15:11:13 UTC
Permalink
I solved my problem. It turns out not to be a NetBeans problem but a path mapping issue.

See a full discussion here (http://netbeans.org/bugzilla/show_bug.cgi?id=188844#c14)

Marty

Continue reading on narkive:
Loading...