Hi all,
i have made breakpoints in our web application porting from vj++ to vj#.The break points were hitting and were enable to track using f11 and f10 keys.
But in vj# ,when insert new break points,it don t seems to hit.Please give us some ideas where it is lacking, inorder to hit the break points.
thanks
praveen

How to hit BreakPoints in VJ#
Guillaume JAY
Hi,
Are you trying to debug a running process or you want to launch the app from visual studio in debug mode
First of all you should ensure that your project is being built for debug configuration. This you can check as follows...
1. Right click on Solution node.
2. Click Select Configuration Manager in context menue.
3. Encuer that "Debug" is selected in Active Configuration Combo box.
Then if you are launching the process from within VS2003 then you should be able to hit the breakpoint. If not then can you please tell us the state of the breakpoint after pressing F5. It is in disabled state if a yellow question mark appears inside red circle of breakpoint.
If you are trying to debug a already running web app then...
1. OPen Vs2003.
2. Click Tools > Debug Processes.
3. from the list of processes select aspnet_wp.exe.
4. Click Attach.
5. In Attach to Process Dialog select "Common Language Runtime" and "Native".
6. Click Ok.
7. Click Close on the "Processes" Dialog.
8. OPen the code file (File > Open)
9. Put breakpoint.
10. Do necessary action in your web app so that breakpoint can be hit.
Hope this helps. If not then please post back.
Thanks.
D-Swat
Hi Raj,
I tried the way as you said to hit break points.now it is hitting for me.The reason for not hitting the breakpoints is that we launch the application through IE.So when it is get launched ,it already attach the IE process and not trying to hit break points.
so i typed the url in IE and then i attached ie process to the debug process,after that its now tracking the break points.Thanks for your suggestions also.
regards
praveen
Rasmus Helmsby Sandberg
Hi
I am working on VS 2003 version and the pdbs are generating after the compilation in the output path.As it is a web application Project,we just copy the pdbs and dlls to the prescribed folder in the webserver .
So whether there is any intial steps to performed, inorder to activate break points.Since you have told some selection for language=vj#.
we use to open the application as project and see required things in project.properties.
It does not even seems to hit.The project run in its usual way without throwing any popups or error.so provide some intialization steps too.
thanks
praveen
John Cheng
Hi
This is the J#browser control having the java class name "Class1".Now i want to hit the break point present in that java file.
-------------------- Contr.jsp------ File----------
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 98">
<META HTTP-EQUIV="Content-Type" content="text/html">
<TITLE>Document Title</TITLE>
</HEAD>
<BODY onLoad="lod();">
<OBJECT CLASSID="CLSID:CF83EA5E-0FFD-4476-9BF7-6C15F7F8BDCF" height="0" width="0" … ID="Object1" VIEWASTEXT>
<PARAM NAME="CODECLASS" VALUE="Project3.dll#Class1">
<PARAM NAME="VJSVERSION" VALUE="1.0.3710">
</OBJECT>
<SPAN id=bindText>This is bound text.</SPAN>
<SCRIPT language=javascript>
function lod()
{
alert("jsanj");
}
</SCRIPT>
</HTML>
And this is the J#browser control class
------------------------------------Class1.java-----------------------------------------------
import
com.ms.wfc.html.*;import
com.ms.wfc.core.*;import
com.ms.wfc.ui.*;public
class Class1 extends DhDocument{
DhText createdText;
DhText boundText;
public Class1()
{initForm(); }
public void dispose()
{super.dispose();}
private void initForm()
{
createdText = new DhText();
createdText.setText("Created Text");
boundText = new DhText();
boundText.setID("bindText");
boundText.setBackColor(Color.LIGHTGRAY);
setBoundElements(new DhElement[] {boundText});
setNewElements(new DhElement[] {createdText});
}
protected void onDocumentLoad(Object sender, Event e)
{
MessageBox.show("kjdka");//----------Here i want to hit the Breakpoint made----
String url=this.getWindowPeer().getDocument().getUrl();
MessageBox.show(url);
com.ms.wfc.html.om.IHTMLWindow2 win=this.getWindowPeer();
}}
So in the above jsp file ,i am able to hit the breakpoints for javascript ,but when thew control comes to the java file ,it does not hit the break points and the execution moves without any informations.
Hope this will understand the criteria somewhat better.
thanks
praveen
galic
Hi,
Can you please answer following questions to help us understand your scenario better...
1. Which version of VS are you working on VS2003 or VS 2005
2. When compilation is over are PDBs generated in the output path
3. When you hit F11/F10, what does say Does it throw any error or pop up any dialog
4. After hitting F11/F10, what is the state of breakpoints Are they enabled/disabled
Also if you are on VS2005, can you please try creating a new Web application in J# and debug it You can do it as follwoing...
1. Open VS2005.
2. Click File > New > WebSite.
3. In the "New Web Site" dialog, select Language = "J#", location = "Http" and Path = http://localhost/WebSite.
4. Click OK.
5. Open "Default.aspx" in source mode.
6. In the <Script> tag, write following code...
int k = 0;
7. Put a breakpoint on it.
8. Press F5.
9. Click OK on the dialog which prompts for modifications of web.config file.
Is the breakpoint hit Please let us know the results.
Thanks.
briankaiser
Hi,
Looks like you are trying to debug a J# browser control. Alright, here are the steps to debug it...
1. Run your JBC in internet explorer(IE).
2. Attach to the IE process. Follow steps 2 to 9 from my last post except in step3 process name should be changed to IE Process.
3. Open the code file (File > Open)
4. Put breakpoint.
5. Do necessary action in your web app so that breakpoint can be hit.
Also check that the pdbs for your dll are loaded or not You can check it by opening Debug > Window > Modules. If no symbols are loaded then right click on dll name and click "Reload Symbols". Then give path to your PDB.
Please post back if it doesn't help. Also post ...1. A small repro code,
2. exact steps you have been following for debugging,
3. the state of the breakpoints.
Thanks.
Xaz
Hi
I am launching a web application through Vj# in debug mode only.And i also check the settings in configuration manager, that too set debug in active configuration combo box.
Now i am able to hit breakpoints in javascripts but Not in Java codes ,which are invoked through <object> tags using J#browser controls.
Regarding ASPNET_WP.exe process attchment,it is not found in the process list,but able to find that is present in my system folders.So i cant able to attach it.
Please give further solution on ,how to hit breakpoints in Java codes too.since we need to maximally track java codes only and also the aspnet_wp attachment.
thanks
praveen
godfrank
Praveen,
I have followed the steps below and it is working for me.
please verify these steps
1.put the break point in your java file and save it.
2.Compile the java file and referrence this dll in your project.
3.Build your project.
4.Open IE
5.Debug->Processes.Attach this IE process .
6.In Attach to Process Dialog select "Common Language Runtime" and "Native".
7.Now in IE type your URL of the web application
8.Goto Debug > Window > Modules. If no symbols are loaded then right click on dll name and click "Reload Symbols". Then give path to your PDB.
Also I have some queries for you
You specified JSP in your sample. VS .Net only supports ASpx pages not JSP pages.
verify that newly compiled dll name is given in your web application beacause old dll may be cached in your application.
Also this is not a J# browser Control .This is a wfc hosting control application
regards,
Raj Thilak