Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.0 and 1.1 Basics
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 18th, 2007, 03:07 PM
Authorized User
 
Join Date: Oct 2006
Posts: 10
Thanks: 0
Thanked 1 Time in 1 Post
Default what is debug directive for codebehind file?

I have an ASP.NET project. I can turn on debugging informations in the aspx files with a page directive like <%@ Debug="true" %>

If there are errors in the inline code in that aspx page, then the debugging messages help me find them. But most of the code lives in a codebehind file, which is also specified in the page directive <%@ src="file.cs" %>. I want to have the same debugging information to find errors in my codebehind file. I can't put the page directive in the C# file. Turning on debugging for the entire application works, but I would like to be able to do it on a file-by-file basis.

Do you know how?

Thanks in advance.

 
Old May 18th, 2007, 03:42 PM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

Are you using visual studio?

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
================================================== =========
Technical Editor for: Professional Search Engine Optimization with ASP.NET
http://www.wiley.com/WileyCDA/WileyT...470131470.html
================================================== =========
Why can't Programmers, program??
http://www.codinghorror.com/blog/archives/000781.html
================================================== =========
 
Old May 18th, 2007, 03:59 PM
Authorized User
 
Join Date: Oct 2006
Posts: 10
Thanks: 0
Thanked 1 Time in 1 Post
Default

I'm not using visual studio.

 
Old May 18th, 2007, 04:18 PM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

Read this:
http://samples.gotdotnet.com/quickst...bugcomsdk.aspx

Also, you should know, this is an "all or nothing" situation. You can not have one page that runs without Debugging and one pages the does in the same assembly.

Also, ONLY use debugging in a development environment as it requires far more overhead from the server and can cause preformance problems in general. Always move applications to a production server with debugging turned off.

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
================================================== =========
Technical Editor for: Professional Search Engine Optimization with ASP.NET
http://www.wiley.com/WileyCDA/WileyT...470131470.html
================================================== =========
Why can't Programmers, program??
http://www.codinghorror.com/blog/archives/000781.html
================================================== =========
 
Old May 21st, 2007, 06:38 PM
Authorized User
 
Join Date: Oct 2006
Posts: 10
Thanks: 0
Thanked 1 Time in 1 Post
Default

I don't know what it means for two pages to be "in the same assembly". Could you elaborate?

It certainly _is_ possible to have two pages next to each other, one with debugging turned on, one without, if they use inline asp code (inside <script runat="server"> tags). I don't know if this contradicts what you said though, since I don't know whether these pages are in the same assembly.

So the upshot is this: you can't both use codebehind/codefiles and also have per file debugging policy at the same time. Have I understood that correctly?

Thanks






Similar Threads
Thread Thread Starter Forum Replies Last Post
cant locate file during debug cprogrammer C++ Programming 0 October 10th, 2007 10:38 PM
Making an Alteration to an VB Codebehind file Nostromo77 ASP.NET 2.0 Basics 4 April 24th, 2007 08:11 PM
Regex within a DirectoryMatch Directive someUser BOOK: Beginning Regular Expressions 1 June 6th, 2006 04:53 AM
CodeBehind for .ascx file isn't working lcsgeek General .NET 1 January 21st, 2005 03:50 PM
#exec server directive vitanza BOOK: Beginning ASP 3.0 1 July 11th, 2003 09:33 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.