CodeVerge.Net Beta


   Explore    Item Entry    Members      Register  Login  
NEWSGROUP
.NET
Algorithms-Data Structures
Asp.Net
C Plus Plus
CSharp
Database
HTML
Javascript
Linq
Other
Regular Expressions
VB.Net
XML

Free Download:




Zone: > NEWSGROUP > Asp.Net Forum > visual_studio.visual_studio_2005 Tags:
Item Type: NewsGroup Date Entered: 12/1/2005 6:43:38 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 6 Views: 49 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
7 Items, 1 Pages 1 |< << Go >> >|
catweazle
Asp.Net User
Unable to set breakpoint in included C# file12/1/2005 6:43:38 PM

0/0

Many of our aspx files include C# "fragments" using the following syntax:
  <!--#include file="serverscripts/foo.cs"-->

These included files predominantly contain C# code, although functions are contained within a "<script runat="server"> block and code delimited by "<%" and "%>" tokens.

In visual studio 2005, I'm unable to set breakpoints at lines within these included files. Clicking in the margin yields an error in the status bar "A breakpoint could not be inserted at this location". VS2003 had a similar problem but it was possible to work around it by turning off the option "Use IntelliSense to verify breakpoints".

Unfortunately this option doesn't seem available for C# in VS2005 - is there some other way around this problem?

If the included file is renamed to have a .txt suffix, then it works, although we then lose the syntax highlighting.

Thanks,

John.
Mikhail Arkhipo
Asp.Net User
Re: Unable to set breakpoint in included C# file12/4/2005 7:13:00 PM

0/0

Visual Studio does not support breakpoints in included files. <!--# is not really ASP.NET syntax, it is classic ASP. VS 2005 does not use intellisense to set breakpoints, it is using actual language service, which also provides code intellisense. VS 2003 did not provide code intellisense in script blocks, so it could blindly set breakpoints which sometimes worked (as it your case, for example).

Thanks

------------------------------------------------------------

This posting is provided "AS IS" with no warranties, and confers no rights.
catweazle
Asp.Net User
Re: Unable to set breakpoint in included C# file12/8/2005 4:18:30 PM

0/0

Why is it possible to set breakpoints in included files when their suffix is changed from .cs to .txt? Is it somehow bypassing using the "language service" (does this cause it to attempt to compile the code?)?

Thanks,

John.
Mikhail Arkhipo
Asp.Net User
Re: Unable to set breakpoint in included C# file12/8/2005 10:20:21 PM

0/0

If there is no service to verify that bp is valid (as it happens with txt files), VS will optimistically set the breakpoint, hoping for the best. This is standard behaviour of C+++ which is unable to verify bp location until application is run. Setting bp does not quarantee that it will get hit though. Do you get breakpoints hit in txt files?


Thanks

------------------------------------------------------------

This posting is provided "AS IS" with no warranties, and confers no rights.
catweazle
Asp.Net User
Re: Unable to set breakpoint in included C# file12/9/2005 9:49:17 AM

0/0

Mikhail Arkhipov (MSFT) wrote:

If there is no service to verify that bp is valid (as it happens with txt files), VS will optimistically set the breakpoint, hoping for the best. This is standard behaviour of C+++ which is unable to verify bp location until application is run. Setting bp does not quarantee that it will get hit though. Do you get breakpoints hit in txt files?



Yes, if the included files are renamed from .cs to .txt, breakpoints can be set and they are hit.
One option is to rename our included C# "fragments" to .txt (or some other innocuous extension), but then we lose the syntax highlighting that we get when they are named with a .cs suffix.

When the included files have a .cs suffix, it seems that VS 2005 is attempting to compile them as plain C# files even though they are included from an aspx file (and errors are generated, as these files contain aspx directives). Is it the "language service" that is attempting to compile these in order to gather the information required to verify the breakpoint is valid?

Thanks,

John.

Mikhail Arkhipo
Asp.Net User
Re: Unable to set breakpoint in included C# file12/9/2005 5:13:58 PM

0/0

Interesting :-) Good workaround, I guess.

You can associate any extension with C# editor in Tools | Options | Text Editor | File Extensions. By the way, why are you using <!-- #include --> instead of say, classes and references? Was the page originally made in classic ASP?


Thanks

------------------------------------------------------------

This posting is provided "AS IS" with no warranties, and confers no rights.
Mikhail Arkhipo
Asp.Net User
Re: Unable to set breakpoint in included C# file12/9/2005 5:18:02 PM

0/0

Yes, if file is associated with C# editor, C# will compile it since it needs compilation to provide intellisense and coloring. It will choke on directives, naturally, since C# compiler does not understand the markup.

Did you try to rename file to ASPX and open in as the web form as it contains markup? You should be able to set breakpoints then, I believe.


Thanks

------------------------------------------------------------

This posting is provided "AS IS" with no warranties, and confers no rights.
7 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Pro Visual C++/CLI and the .NET 2.0 Platform Authors: Stephen R. G. Fraser, Pages: 917, Published: 2005
Microsoft Internet Information Server Resource Kit: technical information and tools for building better Web sites Authors: Microsoft Corporation, Microsoft Corporation, Pages: 587, Published: 1998
Hospital and Health Care Facilities: Hospital and Health Care Facilities Authors: Conrad P. Straub, Pages: 425, Published: 1975
1994 IEEE 13th Annual International Phoenix Conference on Computers and Communications: Phoenix, Arizona, U.S.A., April 12-15, 1994 Authors: Institute of Electrical and Electronics Engineers, IEEE Communications Society, IEEE Communications Society, Pages: 512, Published: 1994
1993 ACM Computer Science Conference: February 16-18, 1993, Indiana Convention Center, Indianapolis, Indiana : Proceedings Authors: Stan C. Kwasny, John F. Buck, Association for Computing Machinery, Association for Computing Machinery, Pages: 543, Published: 1993

Web:
MSDN Visual C# IDE Unable to set breakpoint in included C# file Unable to set breakpoint in included C# file. Actually, for ASP.NET development questions (including integration into Visual Studio and debugging) you ...
Unable to set breakpoint in included C# file - ASP.NET Forums Re: Unable to set breakpoint in included C# file. 12-04-2005, 2:13 PM. Contact ... Re: Unable to set breakpoint in included C# file ...
CCS - unable to place breakpoint in C file, But able to place ... But, For the Same location , If i place a breakpoint in C file, The breakpoint ... then the CCS will automatically include all the files that come under the ...
Klee Dienes - Re: [RFC] add 'save-breakpoints' command These are referenced by a save-breakpoints file to preserve radix across the breakpoint restoration. * valprint.c (set_input_radix_1): Set $input_radix. ...
Carbide Pro, APP Trk, wont set debug point - Developer Discussion ... Unable to set temporary break point in main. .... from C://Symbian//9.1// S60_3rd_MR_3//epoc32//include/aknenv.h:28, ...
Sunil Alankar - RE: GDB 5.2/5.3 breakpoint bug The sources for the systemc library/include files are at ... Thank you Sunil Problem: Unable to set class method breakpoints in solaris with gdb 5.3 while ...
Klee Dienes - [RFC] add 'save-breakpoints' command (set_output_radix_1): Set $output_radix. Index: breakpoint.c .... if (uiout == NULL) + error ("Unable to create cli_out from file for saving breakpoints"); ...
symtab/1607: GDB doesn't know about #included sour: msg#00016 gdb ... When a program is complied with Dwarf 2 debugging information, GDB is unable to set breakpoints in #included files, if the breakpoint location is specified ...
PRB: Unable to Set CodeView Breakpoint on Desired Line Compile options needed: /Zi */ #include int func(); void main(void) { int a, b, c; a = func(); // You cannot set a breakpoint on this line because ...
Chapter 7. Debugging FIXME: include better example. Let's set a breakpoint in on the function main 0: 000> bp main *** WARNING: Unable to verify checksum for test.exe Let's set a ...




Search This Site:










templates

how to create a knowledge base?

iron spped designer

bind treeview to ms access database (vb)

vs 2005 overview

window.showmodaldialog problem

alt features with regular buttons - text descriptions

server application unavailable on live site with godaddy

how to create editable treeview?

inserting a vb/c# command in a text file....

validation (internet explorer 6):

checking a variable or string for a certain value...

web control library + test site please

frames versus master pages

wizard sidebartemplate

click event being called twice

how to pass parameters with httpwebrequest?

working with csv files

different name for app_code.dll?

screen resolution

online store

vs deleted files on publish of website

form authentication, single page access anonimos

rendering in vs.net 2003

visible by administrators only

my simple webcontrol interface doesn't work

ms access database in web matrix.

dotnetnuke 4.0 installation problem

inline code and controls

sendusing" configuration value is invalid.

 
All Times Are GMT