locked
Cannot enter the project to debug mode

    Question

  • Hi

    I have a project that was download from the net. It is a open source project. I can run without anyerror with IDE 2005. But i cannot enter the debug mode. I have set the project build to debug. But i cannt still enter to debug.

    I also got the following message when i run the project.

    /////////////////////

    The following module was built with optimizations enabled or without debug information :

    E:\Project.exe

    To debug this module, change its project build configuration to debug mode. To suppress this message, disable the "Warn inf no user code on launch" debugger option


    ////////////////////
    Saturday, December 15, 2007 8:54 AM

Answers

  • Ensure that the optimization is disabled to allow debug.

     

    Project Properties -> Compile Tab -> Advanced Compilation Options -> Enable Optimization checkbox should be unchecked.

     

    Depending upon which versions of VB your using (Express or pay version) there may be a Build config combobox to set to Debug Build Type or release, ensure this is set to Debug.  

     

     

    Saturday, December 15, 2007 5:27 PM
  •  

    THe tab will be there in any 2005 project

     

    In solution Explorer -> select the project, right click mouse -> properties

     

    Compile Tab will be the 2nd tab shown.

    Tuesday, December 18, 2007 7:53 PM

All replies

  • Ensure that the optimization is disabled to allow debug.

     

    Project Properties -> Compile Tab -> Advanced Compilation Options -> Enable Optimization checkbox should be unchecked.

     

    Depending upon which versions of VB your using (Express or pay version) there may be a Build config combobox to set to Debug Build Type or release, ensure this is set to Debug.  

     

     

    Saturday, December 15, 2007 5:27 PM
  • Hi

    Project is written in Visual Studio 2003. But i open the project with Visual Studio 2005 professional edition. I dont find the Compile Tab as u mention in the reply ... please give me the othrs instruction ...

    i really thank for ur help ... buddy ...
    Monday, December 17, 2007 3:07 AM
  •  

    THe tab will be there in any 2005 project

     

    In solution Explorer -> select the project, right click mouse -> properties

     

    Compile Tab will be the 2nd tab shown.

    Tuesday, December 18, 2007 7:53 PM
  • This error also occurs when you forgetfully "Debug\Attach to Process" and the process is not the same build as the code you are in. (VS08)
    Tuesday, March 04, 2008 2:12 PM
  • I have the solution for this ,

     

    1) Delete the obj and bin folder of your project

    2) Right Click Project > Properties > Compile > Advaced Compile Options

    3) Set the "Generate Debug Info" combo to "none"

    4) Build the Project

    5) Delete the obj and bin folder of your project

    6) Set the "Generate Debug Info" combo to "Full"

    7) Rebuild the project

     

    now place the break point and run , it will be hit

    Tuesday, March 18, 2008 12:21 PM

  • I was having the same problem to find and set debug and release modes in my C#.2005 Express Edition.  None of source or MSDN information has this documented.  I finally found my solution.  I don't understand why Microsoft has it disabled by default for Express edition.  In order to enable it, you need to do the followings:

    1. Tools -> Options
    2. Insure "Show all settings" (in the lower left) is checked; otherwise, you won't see #3
    3. Navigate to "Projects and Solutions"
    4. On the right pane, enable or check "Show advance build configurations."

    After that, you will see an "extra" menu on your toolbar shown up.  From it, you can select either Debug or Release mode, or even go to "Configuration Manager" directly.

    It is what I did to configure my Express edition but I am not sure if it is the same to the Professional edition.

    Hope that it helps.

    Sunday, March 30, 2008 7:51 PM
  • Wednesday, March 18, 2009 5:29 PM

  • /////////////////////

    The following module was built with optimizations enabled or without debug information :

    E:\Project.exe

    To debug this module, change its project build configuration to debug mode. To suppress this message, disable the "Warn inf no user code on launch" debugger option


    ////////////////////


    solution:
    Just click the solution of your project , properties windows is displayed below, now change the Active config to ........  Debug|Any CPU ........
    now u can add breakpoints or run without any messages
    Thursday, June 25, 2009 3:21 PM
  • Hi,

    I am also having the same problem but it is with VS 2008.

    error message is :----------------------------
    Microsoft Visual Studio
    ---------------------------
    The following module was built either with optimizations enabled or without debug information:

     

    C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\pceconsole\bd3fb4ae\b0805359\assembly\dl3\27635de8\567ab59b_09f1ca01\PCEConsoleBusiness.DLL

     

    To debug this module, change its project build configuration to Debug mode. To suppress this message, disable the 'Warn if no user code on launch' debugger option.
    ---------------------------
    OK  
    ---------------------------

    Let me know the solutions.

    Monday, May 31, 2010 11:56 AM
  • Thank you!  I tried for days to figure out the issue and this is the only one that worked!
    Monday, December 27, 2010 4:02 PM
  • I had a similar issue in VS2008. Changing the build configuration to debug and all of the above did not help me. I had this dll installed in the GAC. My solution had a project reference.Inspite of this I had to uninstall this dll from the GAC.

    Even after uninstalling from the GAC, the message keeps coming but I am able to debug the code. I hope if all the above fails, at least this will work. I have spent many precious hours trying to get this working.

    Wednesday, April 20, 2011 8:19 PM