• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1151
  • Last Modified:

Debug mode Visual Studio 2010 Class Project don't stop at breakpoints

I'm developing a Class Library with Visual Studio 2010 for .NET Framework 2.0 in C#. This Class import some functions from winscard.dll.

I've a web app that uses that class (dll) so in the DEBUG tab of my project properties I select START BROWSER WITH URL and select DEBUG CONFIGURATION.

In debug mode, the browser load the start page and use one function of the Class, returns a result code but, the execution never stop at the breakpoints selected in Visual Studio so i can't debug the class code.

I've test it with a C# windows exe object and the debug functions ok.

What am I missing to configure for debug using an URL?
0
leorocha
Asked:
leorocha
  • 5
  • 3
  • 3
  • +2
1 Solution
 
Éric MoreauSenior .Net ConsultantCommented:
have you just tried to press F5 after setting your "set as start page"
0
 
Rainer JeschorCommented:
Hi,
is the web app part of your Visual Studio solution?
If not afaik you would have to attach to the worker process of your web app to get the breakpoint.
0
 
Bob LearnedCommented:
You need to ensure that the debug symbols for that assembly are loaded...
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
Jose ParrotGraphics ExpertCommented:
Well, please check if the PDB - debug information related to the line of code, is present and loaded, when the application links to the remote site. If not, there is no way to make the debugger to associate your source lines to executable code.

As stated by TheLearnedOne, on must load the debug symbols. Please take a look at
http://msdn.microsoft.com/en-us/library/vstudio/x54fht41(v=vs.100).aspx on how to do it.
0
 
leorochaAuthor Commented:
TheLearnedOne and JoseParrot, first of all thanks for your messages. Checked that and is OK.

I've debugged various class libraries of this kind without problem, but with this dll I'm really stuffed. This is a better explanation:

I am creating a class library (dll) in C # that includes the library WINSCARD.DLL:

[DllImport("winscard.dll")]
private static extern int SCardBeginTransaction(IntPtr hCard);
.
.
.
public int ReadUI(out string strUID)
{
.
.
resCode = SCardEstablishContext(SCARD_SCOPE_SYSTEM, IntPtr.Zero, IntPtr.Zero, out hContext);
.
.
}

To test, in Project Properties at Debug tab, I select DEBUG CONFIGURATION and check START BROWSER WITH URL: "http://localhost/mywebapp/mysmartcard.aspx.

I put some break points (ex: at SCardEstablishContext sentence) and press F5 (start debugging). Then the browser is loaded with my start page. I press a button associated with the execution of the function READUI and I get a message generated by the function but the break-point in my c# code is ignored, never stop.

Perhaps the winscard.dll can't be found by the web-app? I really dont know what is happening with this proyect. With other proyects I've developed have no problem at debugging.

Sorry for my english...
0
 
Éric MoreauSenior .Net ConsultantCommented:
have you tried to place a break point right at the top of your page_load event?

are you in debug or release mode (you need to be in debug)?

do you have debuggerstepthrough attributes on your methods (which prevent the debugger from entering in these methods)?
0
 
leorochaAuthor Commented:
emoreau, i don't understand.

I'm debugging the DLL not the web-app, so I put breakpoints in the class source code, and press F5, my web-page (external app) is loaded and consume some functions of the DLL.

If the external app is c# windows interfase then the debug works fine.
0
 
Éric MoreauSenior .Net ConsultantCommented:
is your DLL project loaded into the same solution as your web application and your reference set to this instance?
0
 
Bob LearnedCommented:
When you start the debugging session, are the breakpoints solid red, or an unfilled circle?  They need to be a solid red, in order for the debugger to break on the breakpoint.
0
 
leorochaAuthor Commented:
Solid red.
0
 
Bob LearnedCommented:
Can you attach the output showing the debug symbols being loaded?
0
 
leorochaAuthor Commented:
This output corresponds to START EXTERNAL PROGRAM (utestvuquest.exe win interfase). If I choose START BROWSER WITH URL (http://localhost/MPECmain/myvuquest.aspx) it shows nothing in the output.

'utestvuquest.exe' (Managed (v2.0.50727)): Loaded 'C:\Windows\assembly\GAC_32\mscorlib\2.0.0.0__b77a5c561934e089\mscorlib.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'utestvuquest.exe' (Managed (v2.0.50727)): Loaded 'C:\Factory\AypDesa5\VIGATEC\RIPLEYMATICOS\PILOTO\CSharpModel\bin\utestvuquest.exe'
'utestvuquest.exe' (Managed (v2.0.50727)): Loaded 'C:\Windows\assembly\GAC_32\vjslib\2.0.0.0__b03f5f7f11d50a3a\vjslib.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'utestvuquest.exe' (Managed (v2.0.50727)): Loaded 'C:\Windows\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'utestvuquest.exe' (Managed (v2.0.50727)): Loaded 'C:\Factory\AypDesa5\VIGATEC\RIPLEYMATICOS\PILOTO\CSharpModel\bin\gxclassrDotNet.dll'
'utestvuquest.exe' (Managed (v2.0.50727)): Loaded 'C:\Factory\AypDesa5\VIGATEC\RIPLEYMATICOS\PILOTO\CSharpModel\bin\GxClasses.dll'
'utestvuquest.exe' (Managed (v2.0.50727)): Loaded 'C:\Factory\AypDesa5\VIGATEC\RIPLEYMATICOS\PILOTO\CSharpModel\bin\testvuquest.dll'
'utestvuquest.exe' (Managed (v2.0.50727)): Loaded 'C:\Windows\assembly\GAC_32\System.Data\2.0.0.0__b77a5c561934e089\System.Data.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'utestvuquest.exe' (Managed (v2.0.50727)): Loaded 'C:\Windows\assembly\GAC_MSIL\System.Drawing\2.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'utestvuquest.exe' (Managed (v2.0.50727)): Loaded 'C:\Windows\assembly\GAC_32\vjscor\2.0.0.0__b03f5f7f11d50a3a\vjscor.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'utestvuquest.exe' (Managed (v2.0.50727)): Loaded 'C:\Factory\AypDesa5\VIGATEC\RIPLEYMATICOS\PILOTO\CSharpModel\bin\log4net.dll'
'utestvuquest.exe' (Managed (v2.0.50727)): Loaded 'C:\Windows\assembly\GAC_MSIL\System.Configuration\2.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'utestvuquest.exe' (Managed (v2.0.50727)): Loaded 'C:\Windows\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'utestvuquest.exe' (Managed (v2.0.50727)): Loaded 'C:\Windows\assembly\GAC_MSIL\System.Management\2.0.0.0__b03f5f7f11d50a3a\System.Management.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'utestvuquest.exe' (Managed (v2.0.50727)): Loaded 'C:\Windows\assembly\GAC_32\System.Web\2.0.0.0__b03f5f7f11d50a3a\System.Web.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'utestvuquest.exe' (Managed (v2.0.50727)): Loaded 'C:\Windows\assembly\GAC_32\vjswfc\2.0.0.0__b03f5f7f11d50a3a\vjswfc.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'utestvuquest.exe' (Managed (v2.0.50727)): Loaded 'C:\Windows\assembly\GAC_MSIL\System.ServiceModel.Web\3.5.0.0__31bf3856ad364e35\System.ServiceModel.Web.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'utestvuquest.exe' (Managed (v2.0.50727)): Loaded 'C:\Windows\assembly\GAC_MSIL\System.ServiceModel\3.0.0.0__b77a5c561934e089\System.ServiceModel.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'utestvuquest.exe' (Managed (v2.0.50727)): Loaded 'C:\Factory\AypDesa5\VIGATEC\RIPLEYMATICOS\PILOTO\CSharpModel\bin\messages.spa.dll'
'utestvuquest.exe' (Managed (v2.0.50727)): Loaded 'C:\Factory\AypDesa5\VIGATEC\RIPLEYMATICOS\PILOTO\CSharpModel\bin\GxClassesWin.dll'
'utestvuquest.exe' (Managed (v2.0.50727)): Loaded 'C:\Windows\assembly\GAC_32\vjslibcw\2.0.0.0__b03f5f7f11d50a3a\vjslibcw.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'utestvuquest.exe' (Managed (v2.0.50727)): Loaded 'C:\Windows\assembly\GAC_32\vjswfccw\2.0.0.0__b03f5f7f11d50a3a\vjswfccw.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'utestvuquest.exe' (Managed (v2.0.50727)): Loaded 'C:\Factory\AypDesa5\VIGATEC\RIPLEYMATICOS\PILOTO\CSharpModel\bin\GeneXus.Programs.Common.dll'
'utestvuquest.exe' (Managed (v2.0.50727)): Loaded 'C:\Factory\AypDesa5\VIGATEC\RIPLEYMATICOS\PILOTO\CSharpModel\bin\VUQUEST.dll', Symbols loaded.
'utestvuquest.exe' (Managed (v2.0.50727)): Loaded 'C:\Factory\AypDesa5\VIGATEC\RIPLEYMATICOS\PILOTO\CSharpModel\bin\Jayrock-JSON.dll'
The thread '<No Name>' (0x1dbc) has exited with code 0 (0x0).
The thread '<No Name>' (0x1968) has exited with code 0 (0x0).
The thread '<No Name>' (0x21fc) has exited with code 0 (0x0).
The program '[8308] utestvuquest.exe: Managed (v2.0.50727)' has exited with code 0 (0x0).
0
 
leorochaAuthor Commented:
Not solved, but now it doesn't matter
0

Featured Post

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

  • 5
  • 3
  • 3
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now