Use the following method for step-by-step debugging of web form code-behind using breakpoints in Microsoft Visual Studio.
Note: You must use Visual Studio (Pro or Community, version 2013 and later) installed on a local computer hosting a WorkflowGen test environment. While it might be possible to debug your web forms remotely, this method is not covered in this FAQ; refer to your Visual Studio documentation for more information.
-
Start a new instance of Visual Studio.
-
Select File > Open > Web Site.
-
In the window that opens, select Local IIS from the left-hand pane, then browse to the WorkflowGen website’s
WebForms
folder (\wfgen\wfApps\WebForms
) and open it. -
Open the
\WebForms\web.config
file (or create a new one if it does not exist), then set the compilation element’s debug attribute totrue
.Example
<?xml version="1.0"?> <configuration> <system.web> <compilation debug="true"/> </system.web> </configuration>
-
Set the breakpoint at the line of code in the
default.aspx
page of the web form you’re debugging. -
Select Menu > Debug > Attach to process and check Show processes from all users.
-
Select the WorkflowGen application process from the list and attach it. (The process should be listed as
w3wp.exe
with the User NameIIS APPPOOL\[your WorkflowGen Application Pool name]
.) -
Return to the web browser and launch a new request. When the breakpoint is hit, the Visual Studio window will come to the foreground and allow you to debug.