473,614 Members | 2,268 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Slow Debug of C++ code

Hi,

I am writing a C# application that uses a C++ unmanaged DLL. When I turn the
unmanaged debug option ON, the application is much slower to start and the
unmanaged code is very slow to debug.

Is it normal?

Eric Robert
Nov 16 '05 #1
1 2556
> Hi,

I am writing a C# application that uses a C++ unmanaged DLL. When I turn the unmanaged debug option ON, the application is much slower to start and the
unmanaged code is very slow to debug.

Is it normal?

Eric Robert


Here is more information and a sample program. Writing it, I even found some
kind of weird behavior. The call to OutputDebugStri ng in the DLL doesn't
show if "Enable Unmanaged Debugging" is not set to True.

---

with "Enable Unmanaged Debugging" to False (default)

'DefaultDomain' : Loaded
'c:\windows\mic rosoft.net\fram ework\v1.1.4322 \mscorlib.dll', No symbols
loaded.
'MyWindow': Loaded 'D:\Shared\MyAp plication\Outpu t\MyWindow.exe' , Symbols
loaded.
'MyWindow.exe': Loaded
'c:\windows\ass embly\gac\syste m.windows.forms \1.0.5000.0__b7 7a5c561934e089\ s
ystem.windows.f orms.dll', No symbols loaded.
'MyWindow.exe': Loaded
'c:\windows\ass embly\gac\syste m\1.0.5000.0__b 77a5c561934e089 \system.dll', No
symbols loaded.
'MyWindow.exe': Loaded
'c:\windows\ass embly\gac\syste m.drawing\1.0.5 000.0__b03f5f7f 11d50a3a\system .
drawing.dll', No symbols loaded.
The program '[4064] MyWindow.exe' has exited with code 0 (0x0).

---

with "Enable Unmanaged Debugging" to True

'MyWindow.exe': Loaded 'D:\Shared\MyAp plication\Outpu t\MyWindow.exe' , No
native symbols in symbol file.
'MyWindow.exe': Loaded 'C:\WINDOWS\sys tem32\ntdll.dll ', No symbols loaded.
'MyWindow.exe': Loaded 'C:\WINDOWS\sys tem32\mscoree.d ll', No symbols loaded.
'MyWindow.exe': Loaded 'C:\WINDOWS\sys tem32\kernel32. dll', No symbols
loaded.
'MyWindow.exe': Loaded 'C:\WINDOWS\sys tem32\advapi32. dll', No symbols
loaded.
'MyWindow.exe': Loaded 'C:\WINDOWS\sys tem32\rpcrt4.dl l', No symbols loaded.
'MyWindow.exe': Loaded 'C:\WINDOWS\sys tem32\SHLWAPI.D LL', No symbols loaded.
'MyWindow.exe': Loaded 'C:\WINDOWS\sys tem32\msvcrt.dl l', No symbols loaded.
'MyWindow.exe': Loaded 'C:\WINDOWS\sys tem32\gdi32.dll ', No symbols loaded.
'MyWindow.exe': Loaded 'C:\WINDOWS\sys tem32\user32.dl l', No symbols loaded.
'MyWindow.exe': Loaded
'C:\WINDOWS\Mic rosoft.NET\Fram ework\v1.1.4322 \mscorwks.dll', No symbols
loaded.
'MyWindow.exe': Loaded
'C:\WINDOWS\Mic rosoft.NET\Fram ework\v1.1.4322 \msvcr71.dll', Symbols loaded.
'MyWindow.exe': Loaded
'C:\WINDOWS\Mic rosoft.NET\Fram ework\v1.1.4322 \fusion.dll', No symbols
loaded.
'MyWindow.exe': Loaded 'C:\WINDOWS\sys tem32\shell32.d ll', No symbols loaded.
'MyWindow.exe': Loaded
'C:\WINDOWS\Win SxS\x86_Microso ft.Windows.Comm on-Controls_6595b6 4144ccf1df_6.
0.2600.1331_x-ww_7abf6d02\com ctl32.dll', No symbols loaded.
'MyWindow.exe': Loaded 'C:\WINDOWS\sys tem32\comctl32. dll', No symbols
loaded.
'MyWindow.exe': Loaded
'C:\WINDOWS\Mic rosoft.NET\Fram ework\v1.1.4322 \mscorlib.dll', No symbols
loaded.
'MyWindow.exe': Loaded
'C:\WINDOWS\ass embly\NativeIma ges1_v1.1.4322\ mscorlib\1.0.50 00.0__b77a5c561 9
34e089_173bdc13 \mscorlib.dll', No symbols loaded.
'MyWindow.exe': Loaded
'C:\WINDOWS\Mic rosoft.NET\Fram ework\v1.1.4322 \diasymreader.d ll', No symbols
loaded.
'MyWindow.exe': Loaded 'C:\WINDOWS\sys tem32\ole32.dll ', No symbols loaded.
'DefaultDomain' : Loaded
'c:\windows\mic rosoft.net\fram ework\v1.1.4322 \mscorlib.dll', No symbols
loaded.
'MyWindow.exe': Loaded
'C:\WINDOWS\Mic rosoft.NET\Fram ework\v1.1.4322 \mscorsn.dll', No symbols
loaded.
'MyWindow.exe': Loaded 'C:\WINDOWS\sys tem32\uxtheme.d ll', No symbols loaded.
'MyWindow.exe': Loaded 'C:\WINDOWS\sys tem32\MSCTF.dll ', No symbols loaded.
'MyWindow': Loaded 'D:\Shared\MyAp plication\Outpu t\MyWindow.exe' , Symbols
loaded.
'MyWindow.exe': Loaded
'C:\WINDOWS\ass embly\GAC\Syste m.Windows.Forms \1.0.5000.0__b7 7a5c561934e089\ S
ystem.Windows.F orms.dll', No symbols loaded.
'MyWindow.exe': Loaded
'C:\WINDOWS\ass embly\NativeIma ges1_v1.1.4322\ System.Windows. Forms\1.0.5000. 0
__b77a5c561934e 089_b0194707\Sy stem.Windows.Fo rms.dll', No symbols loaded.
'MyWindow.exe': Loaded
'c:\windows\ass embly\gac\syste m.windows.forms \1.0.5000.0__b7 7a5c561934e089\ s
ystem.windows.f orms.dll', No symbols loaded.
'MyWindow.exe': Loaded
'C:\WINDOWS\ass embly\GAC\Syste m\1.0.5000.0__b 77a5c561934e089 \System.dll', No
symbols loaded.
'MyWindow.exe': Loaded
'C:\WINDOWS\ass embly\NativeIma ges1_v1.1.4322\ System\1.0.5000 .0__b77a5c56193 4
e089_d9a83c92\S ystem.dll', No symbols loaded.
'MyWindow.exe': Loaded
'c:\windows\ass embly\gac\syste m\1.0.5000.0__b 77a5c561934e089 \system.dll', No
symbols loaded.
'MyWindow.exe': Loaded
'C:\WINDOWS\Mic rosoft.NET\Fram ework\v1.1.4322 \mscorjit.dll', No symbols
loaded.
'MyWindow.exe': Loaded
'C:\WINDOWS\ass embly\GAC\Syste m.Drawing\1.0.5 000.0__b03f5f7f 11d50a3a\System .
Drawing.dll', No symbols loaded.
'MyWindow.exe': Loaded
'C:\WINDOWS\ass embly\NativeIma ges1_v1.1.4322\ System.Drawing\ 1.0.5000.0__b03 f
5f7f11d50a3a_14 ee6e58\System.D rawing.dll', No symbols loaded.
'MyWindow.exe': Loaded
'c:\windows\ass embly\gac\syste m.drawing\1.0.5 000.0__b03f5f7f 11d50a3a\system .
drawing.dll', No symbols loaded.
'MyWindow.exe': Loaded
'C:\WINDOWS\Win SxS\x86_Microso ft.Windows.GdiP lus_6595b64144c cf1df_1.0.10.0_ x
-ww_712befd8\Gdi Plus.dll', No symbols loaded.
'MyWindow.exe': Loaded 'C:\WINDOWS\sys tem32\CTAGENT.D LL', No symbols loaded.
'MyWindow.exe': Loaded 'D:\Shared\MyAp plication\Outpu t\MyDLL.dll', Symbols
loaded.
Hello from the DLL
The thread 'Win32 Thread' (0xf20) has exited with code 0 (0x0).
The program '[3560] MyWindow.exe' has exited with code 0 (0x0).
The program '[3560] MyWindow.exe: Native' has exited with code 0 (0x0).

---

Thanks again!

Eric Robert
UbiSoft - Software Engineer


Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
17545
by: DJJ | last post by:
I am using the MySQL ODBC 3.51 driver to link three relatively small MySQL tables to a Microsoft Access 2003 database. I am finding that the data from the MySQL tables takes a hell of a long time to load making any kind linkage with my Access data virtually useless. I have the MySQL driver setup in as a USER DSN. The MySQL data is sitting out on a server and the Access database is running locally. The network connection is very...
8
1951
by: Robert Gravereaux | last post by:
I've noticed that the first exception thrown/caught by an app running in debug is very slow - it takes perhaps 7 or 8 seconds on my P4 machine. I've noticed this on several different machines running the development environment. To replicate, create a new c# windows app, add a button, and hook it to the following code: private void btnException_Click(object sender, System.EventArgs e) { try
16
1733
by: Dean R. Henderson | last post by:
I have a project built for ASP.NET that recently started running really slow in debug mode (it takes about 10 seconds or more to step from one line of code to the next). This just started recently and only impacts one ASP.NET project. I have some other ASP.NET projects that I can step thru with the debugger with almost instant response. I also have some Windows Forms projects that work normally. I am running Visual Studio 2003 and...
3
1265
by: Bob Graham | last post by:
This code: txRate.Text = Format(payRate, "C") (payRate is already succesfully set to a value such as 15D) takes about 3-4 seconds to run the first time, after that it's plenty fast. What makes it slow on the first call? Bob Graham
13
2130
by: dbuchanan | last post by:
This code resets a form with two cbo's (comboBoxes) and one datagrid. The first cbo (cboSelection) selects a main table and filters the second cbo. The second cbo (cboView) selects the secondary table which determine the dataAdapter used to fill the dataGrid. Both cbo's are populated by filling dataAdapters. This code just empty's the datagrid, cbo's and dataset so the user can start over to view another set of data. \\
50
5692
by: diffuser78 | last post by:
I have just started to learn python. Some said that its slow. Can somebody pin point the issue. Thans
3
1953
by: michael | last post by:
Hi, I am trying to write an ASP.NET web app, in Visual Basic.NET, using Visual Studio.NET 2004, .NET framework 1.1.4322 SP1 Running the project/app on localhost while in dev/write/debug stage When I say "trying", I do have it written, and it works ... sort of, for some cases. The problems/issues?
4
3200
by: yuanliu1 | last post by:
Hi, I am debugging my code of visual c++ 6.0. I found it is extremely slow to run after the code is compiled as "debug" mode and OK as "release mode", I would say the difference is around 10x. But I am developing and mainly working on "debug" mode, it is very clumsy to wait for 10 mins for just one run. I did a check and I suppose it is related to the heap check in "debug" mode, so I am wondering if I can turn it off in visual c++ 6.0...
7
2093
by: colin | last post by:
Hi, Ive written a 3dmodel editor, and it works fairly well it harldy uses any cpu exept when its loading a texture from bitmap in the debugger, at all other times it hardly uses any cpu but from the debugger even in release mode it takes a second or so to load a 65k texture, with a 2ghz pc this is 10k instructions per pixel ! I cant understand what its doing here, can anyone shed any light on this ? I have the d3d debug turned off...
0
8180
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8130
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
8623
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
8429
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7091
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
6088
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
5538
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
4050
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...
0
1423
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.