I think you are talking about a Resource Script of some type. Dealing with a Button or Menu.
I must admit, my knowledge of C# is Zero. However, this happens in MFC if you try to use the same Underscore twice.
( As in &Underline in One Menu, and &Undo in another menu) The Framework does not bother to disambiguate, to make you choose between 'Underline' and 'Undo'. The idea of Shortcut Keys is 'Shortcuts', not a philosophical set of Dialogs about what you Really meant when you typed CTRL + U. If there is ambiguity, the system does unexpected things, such as not underlining YOUR &U if the system has already a Ctrl + U in its Scope. Don't know the rules, but I guess, that is where your problem lays.
In effect, there are only 26 Ctrl+... shortcuts available, a bakers dozen of which (such as Ctrl + X for 'Edit.Cut') have been used by Microsoft.
I take it you understand the gist of where I'm getting to.
I am experimenting with Microsoft Visual c++ 2015, for quick tests of console only program I just edit .cpp files with an editor then I call the "developer Command Prompt for VS2015" and compile source using:
cl /EHsc mysource.cpp
then run executable.
My question is, how can I manually now set breakpoints in mysource.cpp file and step through them in a same command line environment?
I agree there must be a way, but any particular reason as to why you don't want to just use the IDE? VisualStudio is actually a pretty darn good product, so why not use it?
If you prefer command line tools, why not use gcc tools on Linux instead? ...I'm on Linux as I type this btw, I just really like what MS has done with VS overall (some of the incremental releases were a bit ridiculous but it's still a good product).
And typically I do not need that to figure out problems. And in critical situations they are not available as in postmortems on production problems.
The C# IDE is in fact the best one that I have used. Best in the context of least difficult to get up and running.
But even then I still run into cases where debugger can't be used because I am always working in threaded situations and at least sometimes dealing with time critical operations. And a break point significantly changes behavior in such situations often making it impossible to diagnose the problem. Prints (or more specifically logging) allows for that.
Should note that I do not and have not for a very long time work with UI code. So mileage on that could be significantly different.
Nobody NEEDS a debugger, just like nobody NEEDS an IDE, it's just another tool to make your job easier.
As to time critical aspects, well... you just have to know how to use a debugger effectively (conditional breakpoints, watchlists) and certainly in conjunction with any other methods in your toolbox. I work with real-time systems every day, I'm a communications/DSP engineer.
Used them for C#, C++ and Java. For years. And they do NOT make what I do significantly easier.
And in the difficult cases the do NOT help.
Albert Holguin wrote:
you just have to know how to use a debugger effectively
To be clear with 40+ years (and approaching) 50 and having used IDEs and debuggers for DECADES I can state that I do in fact know how to do exactly how to use them and do in fact know what features you are talking about and have in fact used them....
So if we can in fact move beyond the implicit denigration I can speak that for what I DO (not you and not others) between being able to actually figure out bugs by doing nothing at all (by just knowing how the flows work and what the code does where the problem lies), by looking at the code and by understanding how the flow works MOST problems that I encountered can be determined without a debugger.
And the problems that are most complex involve interactions which a debugger would NOT help UNLESS I already knew what the bug was.
Albert Holguin wrote:
I work with real-time systems every day,
And I do not. So YOUR mileage may vary.
Finally of course, as I originally pointed out, I have also used a command line debugger which is per the OP. And those are NOT easy to use. Certainly when I used them they didn't support complex debugging support and I suspect setting them up to do that would be extremely difficult.
I do a lot of work in VS2008. It's the editor I have to use for WEC 7 development. I must have 7 different device SDKs installed in my laptop. Recommendation - if you have to do multi-target development, I'd install each in their own VM. Anyway...
So I'm trying to fix some things in a source repository. Made a few changes and tried to save the cpp file. It tells me the fail is locked. okay, Save As... send it to src1.cpp.
Exit VS2008. Nope, there is a phantom dialog window open, I cannot leave. Well, FU VS2008, I kill off the process.
Go to the source folder, try to delete src.cpp. This is what I get:
"The action can't be completed because the file is open in Microsoft C/C++ Compiler Driver"
Now this is completely new to me.
Anyone else seen this error? I know how to ultimately make it go away, but I don't want to reboot just yet.
<italic>Stuck in a dysfunctional matrix from which I must escape...
"Where liberty dwells, there is my country." B. Franklin, 1783
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
Last Visit: 31-Dec-99 18:00 Last Update: 24-Oct-21 12:40