473,753 Members | 7,825 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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(EventArg s e)
{
//
// CODEGEN: This call is required by the ASP.NET Web Form Designer.
//
InitializeCompo nent();
base.OnInit(e);
}
private void InitializeCompo nent()
{
//add events here - page load and submit in this case
this.cmdSubmit. Click += new
System.EventHan dler(this.cmdSu bmit_Click);
this.Load += new System.EventHan dler(this.Page_ Load);

}
#endregion

hope this helps somebody

- Supersonic Steve

Nov 17 '05 #1
2 2680
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*****@canadi ensfan.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(EventArg s e)
{
//
// CODEGEN: This call is required by the ASP.NET Web Form Designer.
//
InitializeCompo nent();
base.OnInit(e);
}
private void InitializeCompo nent()
{
//add events here - page load and submit in this case
this.cmdSubmit. Click += new
System.EventHan dler(this.cmdSu bmit_Click);
this.Load += new System.EventHan dler(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
1929
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 stuck at some point. Is there an easy way to know where it comes from other than putting breakpoints all over the code? 'cause it's huge and I would have to set breakpoints for at least a day or two thanks
1
3332
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 and installed the "full" remote debugger on the server. I then open the project using "File, Open, Project from web". All works fine, using "built-in" version control, all my files appear no problem.
5
1465
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 vb6 document and convert it into a vb.net program. Once I did that, the routine "check_for_file" I yanked out & put into my service program. The program though - doesn't work like the existing VB6 one does.
9
4912
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 at these breakpoints but unfortunatly it does not.. I had allowed script debugging in both iis home directory and in internet explorer. Also i added everyone from active directory to be members of debugging group. Web Server is W2k sp4 and iis...
2
4220
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 .NET. I could not debug using breakpoints, breakpoints are not getting hit, but the application is working fine with out any issue.
1
2116
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.. Breakpoints in the main file are working OK, but any breakpoints in imported files are not... The three imported files are open in Komodo and are in the same local directory as the main file (in the python24/Lib/site-packages tree)... The code...
3
1589
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# WinForms project either by pressing F5 or clicking Start button on toolbar, it sometimes doesn't execute the currently changed code and runs previously compiled code and this strange thing happens occasionally no matter its started in Debug or Release...
5
2099
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 test on certain line using (add-in testmatrix), I run the "debug test" option the test runs but it does not stop to debug, any ideas, is it an option that I missed when installing vs2008? thanks
1
1990
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 at breakpoints.. How to solve the problem please help. Thanks.
0
8896
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9653
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9451
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9421
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8328
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6869
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6151
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4771
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
3
2284
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.