I have an ASP.NET C# project consuming webservices and WebMethods are wrote in VB.NET with source code on a local IIS server. The WebMethod returns null, and I want to debug it to know why I get this.
As you may know, if I set a breakpoint just before the webmethod call, I cant step into this webmethod.
So, how is the correct way to debug this webmethod?
Thank you!
Aryan Kumar
06-Jul-2023Sure, I can help you with that. Here are the steps on how to debug a VB.NET WebMethod:
VB.Net
Here is an explanation of the code:
WebMethod
attribute is used to mark a method as a WebMethod.HelloWorld
method is a WebMethod that returns the string "Hello, World!".Set a breakpoint
command is used to set a breakpoint on a line of code.Start Debugging
button is used to start the debugger.Step through
command is used to step through the code line by line.Inspect the values of variables
command is used to inspect the values of variables.Sumit Kesarwani
26-Aug-2014Attach the debugger to the server process, put a breakpoint in the web method code and invoke the web method.
Visual Studio should break within the web method.