views:

283

answers:

4

I have some legacy Web Services written in C# ASP.NET. There is a specific object in a library used by the Web Service that I need to inspect. Setting a breakpoint in the web service doesn't do anything.

This is made harder by the fact that the code is so horrendous that the entry point to the Web Service callout is not obvious.

A: 

Are you running the build using debugging? I think ASP.net doesn't run using debugging by default.

ing0
I'm pretty sure I am.
DevDevDev
Are you including any compiled dlls?
ing0
+2  A: 

Here are some reasons your breakpoint might not be working:

  1. You're attaching the debugger to the wrong process.
  2. The PDB for your assembly does not match the assembly (Modules window shows PDB load status). Perhaps the PDB is old.
Tim Stewart
I'll bet #1.
MusiGenesis
A: 

If you're running some website that uses the web service, you can manually attach the debugger to the web service process as well as the website, using Debug - Attach Process...

Thorarin
A: 

You might try putting a line in where you want it to stop using System.Diagnostics.Debugger.Break() or System.Diagnostics.Debugger.Launch().

Jason Haley