Converted C# Doesn't Stop at Breakpoints

L

lafleur

I solved this problem, and thought I should post a solution for it.

I converted a VB.NET web app to C# using SharpDevelop. When I went to
run the C# version, the IDE was ignoring breakpoints - ie. it wouldn't
stop at breakpoints.

After investigating, we found that we had to manually add this region
to the .cs pages:

#region Web Form Designer generated code
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: This call is required by the ASP.NET Web Form Designer.
//
InitializeComponent();
base.OnInit(e);
}
private void InitializeComponent()
{
//add events here - page load and submit in this case
this.cmdSubmit.Click += new
System.EventHandler(this.cmdSubmit_Click);
this.Load += new System.EventHandler(this.Page_Load);

}
#endregion

hope this helps somebody

- Supersonic Steve
 
G

Guest

Strange - source code converters shouldn't be omitting sectons of your
original code. Try ours (Instant C#). It doesn't omit portions of code.
--
David Anton
www.tangiblesoftwaresolutions.com
Instant C#: VB.NET to C# Converter
Instant VB: C# to VB.NET Converter
Instant C++: C# to C++ Converter
Instant J#: VB.NET to J# Converter
 

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

Top