FeaturesPluginsDocs & SupportCommunityPartners

NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

[nbajax] Re: NetBeans 6.5 Beta

 
Post new topic   Reply to topic    NetBeans Forums -> Ruby Users
View previous topic :: View next topic  
Author Message
Mark Dey
Posted via mailing list.





PostPosted: Thu Aug 21, 2008 3:07 pm    Post subject: [nbajax] Re: NetBeans 6.5 Beta Reply with quote

Some of the UI has changed since the JS debugger user guide was last
updated.

For the simple scenario below for single page debugging outside of a
project, try this:

1. Debug->Attach Debugger
2. Select "Web Page Debugger (JavaScript)" from the list of debugger
choices
3. Enter the URL, eg. file:///tmp/Foo.html, Click OK
The page should load in the browser and a debug session will be
launched.
4.To Load the source into the editor, click the pause button (Debug-
Quote:
Pause)
You should now be able to set breakpoints in the file which will be
triggered when you reload the page.

I think an issue has been filed to do #4 automatically.

Hope this helps.

- Mark


On Aug 20, 2008, at 8:20 PM, Tor Norbye wrote:

Quote:
I think nbajax@sun.com is the right alias to approach with questions
about the javascript debugger. The JavaScript debugger is mostly
language/framework agnostic except for a small project integration
for each platform (Rails, Java EE etc). Hopefully somebody on the
nbajax alias from the javascript debugger team can comment on this.

-- Tor

On Aug 20, 2008, at 3:45 PM, bruparel wrote:

Quote:

Thanks everyone for your responses. Let us take baby steps.
Javascript
debugger is something that I have been anxiously waiting for and is
a big
reason for upgrading from NetBeans 6.1 to 6.5. I am not sure if
you want me
to report these to NBAjax forum? The reason I ask is that I am
working with
Ruby (and Rails off course) only IDE for awhile.

At this point, putting jQuery aside temporarily, I will be very
happy if I
could somehow launch the Javascript debugger in a simple HTML page
shown
below:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Script 2.2</title>
<link href="../css/global.css" rel="stylesheet" type="text/css">
<script type="text/javascript">
var name = prompt('What is your name?', '');
</script>
</head>
<body id="twoCol">
<div id="container">
<div id="banner"> ../images/banner.png http://www.sawmac.com/missing/js/
</div>
<div id="contentWrap">
<div id="main">
<h1>Using a Variable, Part II</h1>
<script type="text/javascript">
document.write('<p>Welcome ' + name + '</p>');
</script>
</div>
<div id="sidebar">
<h2>Script 2.1</h2>
</div>
</div>
<div id="footer"><em>“Building Interactive Web Sites with
JavaScript”</em></div>
</div>
</body>
</html>

This is from the Javascript - The Missing Manual Book by David Sawyer
McFarland.

I put a breakpoint at the following line:

document.write('<p>Welcome ' + name + '</p>');

And I am following the directions on NetBeans wiki here:

http://wiki.netbeans.org/JavaScriptDebuggerNetBeans6.5M1UserGuide#section-JavaScriptDebuggerNetBeans6.5M1UserGuide-NetBeansJavaScriptDebuggerTechnologyPreviewUserGuide

The directions clearly state that you can debug individual HTML files
containing Javascript code. Please see the following snippet of
text from
directions:

......
Starting Debugging
Project
You can use the Run:Debug Main Project action to debug the project.

Start Debugging a file
You can debug an individual.html file using the Debug File action
in the
file's popup menu.

The debugger checks if the Firebug 1.1beta+ and NetBeans Firefox
Extension
have been installed in Firefox. If not found a message dialog is
shown:

.......

I have checked that both Firebug beta and NetBeans Firefox
Extensions are
installed in Firefox and that Firebug is enabled. But when I bring
up the
pop-up menu by right-clicking on the editor window for the code
displayed
above, I do not see a debug menu. I went to the main pull down
debug menu
which displays an option for debugging the currently open code
which I have
pasted above, but choosing it does not do anything. There is
something that
I am missing here. If one of you can try to replicate this simple
setup
preferably on Windows XP machine, I will really appreciate it. I
use my
Windows machine as a sort of test bed, since I am doing serious
development
on my Ubuntu machines using NetBeans 6.1. I have two Ubuntu
laptops and
will try NetBeans 6.5 next on them. Improved Javascript and CSS
support
makes NetBeans 6.5 a very compelling story. Let us try to get this
right.
I am not sure who to work with NB Ajax group. Should we not be
inviting the
people responsible for Javascript integration in Ruby only IDE to
participate in beta testing discussions?
Bharat
--
View this message in context: http://www.nabble.com/NetBeans-6.5-Beta-tp19070005p19079460.html
Sent from the NetBeans Ruby - Users mailing list archive at
Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@ruby.netbeans.org
For additional commands, e-mail: users-help@ruby.netbeans.org

Back to top
bruparel
Posted via mailing list.





PostPosted: Fri Aug 22, 2008 1:45 am    Post subject: [nbajax] Re: NetBeans 6.5 Beta Reply with quote

Hello Mark,
Thanks for your response.

Actually Remote Debugging is the only way that I could make it work, i.e.,
by doing Attach Debugger.

Here is something that worked for me:

1. I opened the file that I wanted to debug in NetBeans editor and put a
breakpoint where I wanted. NetBeans Javascript editor lets you do that -
right click on the gutter.

2. I determined the URL path for this file by right-clicking on it and
"Viewing" it in the browser. I copied the URL to the clipboard.

3. I opened the Attach Debugger window by following Debug->Attach Debugger.
and selected "Web Page Debugger (JavaScript)" from the list of debugger
choices.

4. I pasted the URL that I had copied and Clicked OK - the page got loaded
in the browser and a debug session was launched - and the debugger stopped
at the breakpoint that I had specified in step 1.

5. What is interesting is that now you have source code being displayed and
debugging available both in NetBeans and Firebug! You can use either!

Certainly not the thing for mere mortals like me! I hacked pretty much for
a few hours before discovering all this which is NOT well-documented as you
point out. Life in Javascript debugging should be easier than that. Do you
know if there are any plans to "humanize" this behavior?

Regards,

Bharat
--
View this message in context: http://www.nabble.com/NetBeans-6.5-Beta-tp19070005p19100053.html
Sent from the NetBeans Ruby - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@ruby.netbeans.org
For additional commands, e-mail: users-help@ruby.netbeans.org
Back to top
Mark Dey
Posted via mailing list.





PostPosted: Fri Aug 22, 2008 4:26 am    Post subject: [nbajax] Re: NetBeans 6.5 Beta Reply with quote

Quote:
I think an issue has been filed to do #4 automatically.

I just verified that this has been fixed in the post-beta dev build.
In fact, once the debugger is attached, the source for any page that
you navigate to in the browser is automatically loaded in the IDE
until you stop the debugging session.

- Mark


On Aug 21, 2008, at 8:07 AM, Mark Dey wrote:

Quote:
Some of the UI has changed since the JS debugger user guide was last
updated.

For the simple scenario below for single page debugging outside of a
project, try this:

1. Debug->Attach Debugger
2. Select "Web Page Debugger (JavaScript)" from the list of debugger
choices
3. Enter the URL, eg. file:///tmp/Foo.html, Click OK
The page should load in the browser and a debug session will be
launched.
4.To Load the source into the editor, click the pause button (Debug-
Quote:
Pause)
You should now be able to set breakpoints in the file which will be
triggered when you reload the page.

I think an issue has been filed to do #4 automatically.

Hope this helps.

- Mark


On Aug 20, 2008, at 8:20 PM, Tor Norbye wrote:

Quote:
I think nbajax@sun.com is the right alias to approach with
questions about the javascript debugger. The JavaScript debugger is
mostly language/framework agnostic except for a small project
integration for each platform (Rails, Java EE etc). Hopefully
somebody on the nbajax alias from the javascript debugger team can
comment on this.

-- Tor

On Aug 20, 2008, at 3:45 PM, bruparel wrote:

Quote:

Thanks everyone for your responses. Let us take baby steps.
Javascript
debugger is something that I have been anxiously waiting for and
is a big
reason for upgrading from NetBeans 6.1 to 6.5. I am not sure if
you want me
to report these to NBAjax forum? The reason I ask is that I am
working with
Ruby (and Rails off course) only IDE for awhile.

At this point, putting jQuery aside temporarily, I will be very
happy if I
could somehow launch the Javascript debugger in a simple HTML page
shown
below:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Script 2.2</title>
<link href="../css/global.css" rel="stylesheet" type="text/css">
<script type="text/javascript">
var name = prompt('What is your name?', '');
</script>
</head>
<body id="twoCol">
<div id="container">
<div id="banner"> ../images/banner.png http://www.sawmac.com/missing/js/
</div>
<div id="contentWrap">
<div id="main">
<h1>Using a Variable, Part II</h1>
<script type="text/javascript">
document.write('<p>Welcome ' + name + '</p>');
</script>
</div>
<div id="sidebar">
<h2>Script 2.1</h2>
</div>
</div>
<div id="footer"><em>“Building Interactive Web Sites with
JavaScript”</em></div>
</div>
</body>
</html>

This is from the Javascript - The Missing Manual Book by David
Sawyer
McFarland.

I put a breakpoint at the following line:

document.write('<p>Welcome ' + name + '</p>');

And I am following the directions on NetBeans wiki here:

http://wiki.netbeans.org/JavaScriptDebuggerNetBeans6.5M1UserGuide#section-JavaScriptDebuggerNetBeans6.5M1UserGuide-NetBeansJavaScriptDebuggerTechnologyPreviewUserGuide

The directions clearly state that you can debug individual HTML
files
containing Javascript code. Please see the following snippet of
text from
directions:

......
Starting Debugging
Project
You can use the Run:Debug Main Project action to debug the project.

Start Debugging a file
You can debug an individual.html file using the Debug File action
in the
file's popup menu.

The debugger checks if the Firebug 1.1beta+ and NetBeans Firefox
Extension
have been installed in Firefox. If not found a message dialog is
shown:

.......

I have checked that both Firebug beta and NetBeans Firefox
Extensions are
installed in Firefox and that Firebug is enabled. But when I
bring up the
pop-up menu by right-clicking on the editor window for the code
displayed
above, I do not see a debug menu. I went to the main pull down
debug menu
which displays an option for debugging the currently open code
which I have
pasted above, but choosing it does not do anything. There is
something that
I am missing here. If one of you can try to replicate this simple
setup
preferably on Windows XP machine, I will really appreciate it. I
use my
Windows machine as a sort of test bed, since I am doing serious
development
on my Ubuntu machines using NetBeans 6.1. I have two Ubuntu
laptops and
will try NetBeans 6.5 next on them. Improved Javascript and CSS
support
makes NetBeans 6.5 a very compelling story. Let us try to get
this right.
I am not sure who to work with NB Ajax group. Should we not be
inviting the
people responsible for Javascript integration in Ruby only IDE to
participate in beta testing discussions?
Bharat
--
View this message in context: http://www.nabble.com/NetBeans-6.5-Beta-tp19070005p19079460.html
Sent from the NetBeans Ruby - Users mailing list archive at
Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@ruby.netbeans.org
For additional commands, e-mail: users-help@ruby.netbeans.org


Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> Ruby Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB