Can I debug and see where I am in an website?

J

JB

I'm trying to fix a site that someone has left me and - to understate
it - it is huge!
I'm trying to work on a specific section but i can't seem to find
where the proper code for it is..

There is a menu on the main page which, when clicked brings up a
dialog box which needs filling out. I just can't find the code for
this section.
There are dozens of namespaces, hundreds of classes, and loads
of .aspx, .asax, .asmx files.
No comments or documentation available.

So since i've got remote debugging working, can I see where I am in
the site somehow? Which page/class/method has just been run?

Just to make things worse its Vis Studio 2003, .NET 1.1
 
K

Kevin Spencer

You can step through the code in the Visual Studio debugger when you run the
site in Visual Studio in Debug mode. It will load the pages and code files
into the Editor when they are used. This is assuming that there are no DLLs
in use (you didn't mention any), or that the DLLs are debuggable.

--
HTH,

Kevin Spencer
Chicken Salad Surgeon
Microsoft MVP
 
M

Mark Rae [MVP]

There is a menu on the main page which, when clicked brings up a
dialog box which needs filling out. I just can't find the code for
this section.

Does the dialog box not have any text in it that you could use as your
search criterion in VS.NET...?
 
J

JB

I can step through all the way until the code stops - and the page has
completed loading.
but once it has loaded - and i need to interact with the site to get
to the page i want, stepping through stops and it just continues
through all the way. Unless i am missing a setting somewhere?
 
J

JB

Does the dialog box not have any text in it that you could use as your
search criterion in VS.NET...?

Alas, no. I did a search and only found corresponding text in a .isql
document in a stored procedure.
Searching for the procedure name didnt bring up anything, which i
thought was odd...
 
M

Mark Rae [MVP]

Alas, no. I did a search and only found corresponding text in a .isql
document in a stored procedure.
Searching for the procedure name didnt bring up anything, which i
thought was odd...

Hmm - well, the page from which the dialog box is launched must display its
name in the browser address bar, so I guess that's your starting point...

I've been in your situation before many times, and don't envy you one bit!
 
M

Mohamad Elarabi

You can turn tracing on either in the web config or on that aspx page you're
debugging also turn debug=true.

The problem with stepping through is that you get the top-bottom run process
but you may not go through all events that actually take place.

If you look at the aspx page, the code that's rendering is either on the
page itself, in a master page, or in a control that is used on the page. If
you suspect a certain custom control you can right click on its name and
select "Go to definition" and that might take you to the control's code where
you can put breaks there as well.

Good luck with this. I hate it when that happens.
 
K

Kevin Spencer

You can put break points in any page that is requested during the debugging
session, and the debugger will stop at those. Presumably, you should be able
to identify that pages that you will be requesting via their URLs.

--
HTH,

Kevin Spencer
Chicken Salad Surgeon
Microsoft MVP
 
J

JB

Well that was my problem.
The page i want is linked off default.aspx, but its not a page as
such, its a dialog box - hance no URL.
And the link isn't really a link - i beleive its some sort of
Javascript menu - and a breakpoint in a js file doesnt seem to work.
I can put in breakpoints, but it is not at all obvious where the code
is handling the menu Click event - I can step through all the way
through the page initialization until i get to the point where it is
sitting waiting for user input, then it seems to turn stepping through
off itself.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,068
Latest member
MakersCBDIngredients

Latest Threads

Top