Solved

"one or more breakpoints cannot be set and have been"

Posted on 2003-10-30
27
3,122 Views
Last Modified: 2007-12-19
im not sure if im right here now,

but i'm developing a c-dll with visual c++ 6 using the lotus notes api.

compiling and debugging worked fine till yesterday.

when i set a breakpoint i allways get this message
"one or more breakpoints cannot be set and have been ..."

but i havet to debug because the notes-api documentation is crap.
hope someone can help me.

im using a vb application do test the dll.

thanx in advance
0
Comment
Question by:ragerino
  • 13
  • 5
  • 4
  • +3
27 Comments
 
LVL 3

Expert Comment

by:a_pravarakhya
ID: 9649020
You have put a break point at line where the control doesnt go there. check if you have put the break point in right place.


Regards,
Pravarakhya
0
 
LVL 6

Expert Comment

by:GloomyFriar
ID: 9649233
Check that the destination folder for the dll is the same that is used when the programm is started.
0
 
LVL 3

Author Comment

by:ragerino
ID: 9649358
yes i did
debugging worked last time. from one moment to the other it doesn't.
0
 
LVL 5

Expert Comment

by:dennis_george
ID: 9649382
Do check the current Build setting (Active Configuration) .... Build --> Configurations.....
It should be set to DEBUG.. Normally if its set to release mode you can't able to set the break points......

Dennis
0
 
LVL 3

Author Comment

by:ragerino
ID: 9649395
it disables all of my breakpoints
0
 
LVL 3

Author Comment

by:ragerino
ID: 9649410
it is set to debug.
and in the debugsettings there is the testapp.exe which uses the dll.
the testapp is placed in the same folder like the compiled dll.
0
 
LVL 3

Author Comment

by:ragerino
ID: 9649445
Settings of the active Configuration

GENERAL
Build command line: NMAKE /f busytime2.mak
Rebuild all options: /a
Output file name: busytime.dll
Browse info file name: busytime.bsc

DEBUG (Category General, no additonal DLL's)
Executable for debug session: bt_test.exe
Workin directory:c:\busytime_txt
Program arguments:
Remote executable path and file name:

Active Configuration is for busytime2.dll - WIN32 Debug
0
 
LVL 3

Author Comment

by:ragerino
ID: 9649504
maybe i have to activate a service or something outside visual c++ (maybe in vb when making the exe ???)

it would be very fine to post screenshots in here
0
 
LVL 9

Expert Comment

by:tinchos
ID: 9649505
Hi ragerino......

I'm not sure if what I'm about to tell you will work on your case.

I'd try cleaning your projects and rebuilding them again.

It happended to me that I got that error when the dll's trying to debug were kind of corrupt and it was solved using what I told you.

Tincho
0
 
LVL 3

Author Comment

by:ragerino
ID: 9649535
how do you mean  "clean the projects"  ???
what i have to do ???
0
 
LVL 3

Expert Comment

by:a_pravarakhya
ID: 9649569
just "rebuild all" and try. This will "clean the projects". I suggest to debug in this way: Just press F11 and see where the control is actually going.
0
 
LVL 3

Author Comment

by:ragerino
ID: 9649584
im doing allways a rebuild all and when starting to debug it deactivates all of my breakpoints :(

btw. is it ok when the release- and the debug-folder is empty ???
0
 
LVL 3

Author Comment

by:ragerino
ID: 9649588
Deleting intermediate files and output files for project 'busytime2 - Win32 Debug'.
--------------------Configuration: busytime2 - Win32 Debug--------------------
Microsoft (R) Program Maintenance Utility   Version 6.00.8168.0
Copyright (C) Microsoft Corp 1988-1998. All rights reserved.
 cl -Z7 -Od -c -W3 -DCRTAPI1=_cdecl -DCRTAPI2=_cdecl -nologo -D_X86_=1 -D_WINNT -D_WIN32_WINNT=0x0400 -D_WIN32_IE=0x0300 -DWINVER=0x0400 /Zp -Ow -DW32 -DWIN32  -D_WIN32 -Fobusytime2.obj busytime2.c
busytime2.c
 link -debug:full -debugtype:cv -base:0x1C000000  -dll -entry:_DllMainCRTStartup@12  -out:busytime.dll  busytime2.obj  libc.lib oldnames.lib kernel32.lib  ws2_32.lib mswsock.lib advapi32.lib libc.lib oldnames.lib kernel32.lib  ws2_32.lib mswsock.lib
 advapi32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib notes.lib
Microsoft (R) Incremental Linker Version 6.00.8168
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.

busytime2.dll - 0 error(s), 0 warning(s)
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 9

Expert Comment

by:tinchos
ID: 9649592
Exactly

Either choose the Clean option in the build menu or choose the rebuild option directly

Tincho
0
 
LVL 3

Expert Comment

by:a_pravarakhya
ID: 9649610
I suggest to debug in this way: Just press F11 and see where the control is actually going.
0
 
LVL 3

Author Comment

by:ragerino
ID: 9649649
just assembler code.
and i think that i have very often to press f11 to get to the lines i want to set my breakpoint.
0
 
LVL 3

Assisted Solution

by:a_pravarakhya
a_pravarakhya earned 250 total points
ID: 9649692
try this: press f5 and select debug>break. now see where did the control stop. if you see the assembler code, see call stack (alt+7) and try to get where exactly the control is going.
0
 
LVL 3

Author Comment

by:ragerino
ID: 9649705
now im trying to dl the newest service-pack for visual-studio6
0
 
LVL 5

Expert Comment

by:dennis_george
ID: 9649709
hi

Just go to

project --> setting --> Link

Is the generate debug info checked or not ????

Dennis
0
 
LVL 3

Author Comment

by:ragerino
ID: 9649745
hi dennis,

project --> setting --> there is nothing like link

im using visual c++ 6.
maybe you use a different version.
0
 
LVL 5

Expert Comment

by:dennis_george
ID: 9649838
hi

when you click on project --> setting then it will open a dialog box (property sheet  / tab strip)

In this there will be a tab named Link.....  Click on that

And I am also talking about Visual C++ 6

Dennis
0
 

Expert Comment

by:himch
ID: 9649867
Hi

The problem could be with the settings in  Tools -> Options -> Directories.
 Just check if you have the correct directories added to "Include" and "Library".

Because, if wrong directories are added, then the files you are opening are not the ones you have included in the project, and hence you can not set break points in them.
You can also check the name and path of the files you are trying to put the breakpoints in by checking its properties, to ensure if they are the correct files.


Hope it helps.

Himanshu
0
 
LVL 5

Expert Comment

by:dennis_george
ID: 9649872
One more probability is that the place where you are trying to put the break point may not be the part of the current compilation....

suppose the constant EDITOR is not defined in my project and some part of code is like.....

#ifdef EDITOR

int i = 0 ;  // Here I can't put a break point .. because this code will not be included in the currrent
              // compilation.... because EDITOR is not define anywhere....
.....

#endif


Dennis
0
 
LVL 5

Accepted Solution

by:
dennis_george earned 250 total points
ID: 9649897
and more over you can't put a break point on the code where you are only declaring an object or data type ... i.e where no operations are taking place...

like you can't put break point at

int i ;

Dennis
0
 
LVL 3

Author Comment

by:ragerino
ID: 9649994
hehe i found that f***ing error.

the .c .mak and .h file is called busytime2.*

but in the .mak file i called the ouputfilename busytime.dll (because of compatibility issues).

seems that visual c++6 is too stupid to recognize this.

dennis_george and a_pravarakhya have been the most active posters so im splitting the points to them.
0
 
LVL 6

Expert Comment

by:GloomyFriar
ID: 9652197
>dennis_george and a_pravarakhya have been the most active posters so im splitting the points to them.

If you were closely attentive to my comment, you have found out a problem much earlier.
But if you consider, that I have not earned any points, so let it be so. ;-(
0
 
LVL 3

Author Comment

by:ragerino
ID: 9656296
but i was using the right dll in the testapp and the tesapp worked. but i had to change the outfilename in the mak-file to the same name in the .h .c and .mak files.
the problem wasn't that i didn't find the compiled dll, the problem was that i wasn't able to debug using brakepoints.

btw. the dll is working now perfectly.
but anyway, thanks for your and the others users help.

wish you all a scary halloween :)
greets ragerino
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now