By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,850 Members | 970 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,850 IT Pros & Developers. It's quick & easy.

Converted C# Doesn't Stop at Breakpoints

P: n/a
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

Nov 17 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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

"la*****@canadiensfan.com" wrote:
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

Nov 17 '05 #2

P: n/a
Also noticed that it adds /n /t characters to SQL statements.

Be careful, folks.

Nov 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.