473,326 Members | 2,133 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Converted C# Doesn't Stop at Breakpoints

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
2 2661
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
Also noticed that it adds /n /t characters to SQL statements.

Be careful, folks.

Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

16
by: ThunderMusic | last post by:
Hi, My app does not stop whan I click on the form. I mean, the form is closing, but the process keeps running in the task manager. So I figured there are memory leaks or some object's process...
1
by: monsteruk | last post by:
Hi, Seems like a few people are having debug problems, mine seems subtley different though! I have a win2003 svr with my c# ASP.NET web site running all ok. I have setup all the permissions...
5
by: Blasting Cap | last post by:
I have a VB6 program that runs as an app, that I want to both convert it to vb.net, and run it as a service on the server. I have been able to create the service, and what I did was to open the...
9
by: Rea | last post by:
Hi eb I set some 'Stop' statements and also visual breakpoints in asp code (vbscript). I am doing that in Microsoft Script debugger. Than I refresh the original page and expect execution to halt...
2
by: MSK | last post by:
Hi, Continued to my earlier post regaring "Breakpoints are not getting hit" , I have comeup with more input this time.. Kindly give me some idea. I am a newbie to .NET, recently I installed...
1
by: jeem | last post by:
I am using ActiveState Komodo 3.5 to work on a large python 2.4 application with an extensive UI... I am attempting to debug the application and am setting breakpoints in 4 different *.py files.....
3
by: =?Utf-8?B?QWRpbCBBa3JhbQ==?= | last post by:
I posted this question in vsnet.ide newsgroup about more than a week back but didn't get any single response yet therefore, reposting again same to several newsgroups. When I run my C#...
5
by: =?Utf-8?B?cmF1bGF2aQ==?= | last post by:
vs2008 c# add-in TestMatrix 2.0 nUnit 2.4.7 apologize for trying here to get answers to my problem but i might be lucky if some one can give me a hint or tip. I trying to start debugging my...
1
by: Amrapali0917 | last post by:
Hello, A C++ / MFC program does not stop at breakpoints in any visual studio IDE but runs well. The project settings are ok as i have tried same program on different machines where it does stop...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.