DevDevDev
DevDevDev

Reputation: 5177

Debugging C# ASP.NET Web Services

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.

Upvotes: 1

Views: 6817

Answers (4)

Jason Haley
Jason Haley

Reputation: 3800

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

Upvotes: 1

Thorarin
Thorarin

Reputation: 48516

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...

Upvotes: 0

Tim Stewart
Tim Stewart

Reputation: 5500

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.

Upvotes: 3

ingh.am
ingh.am

Reputation: 26812

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

Upvotes: 0

Related Questions