On 06.03.2011 13:36, James Kanze wrote:
[...]
I like the mouse when I'm just browsing, without any specific
goal in mind. Or when I'm dealing with a graphical
representation, like UML. Otherwise, however, I don't like
having to move my hands from the base position on the keyboard.
It costs too much in productivity.
Agreed, but I don't see the difference controlling VI / VIM by keyboard
or VStudio by keyboard ? [o.k. VIM should be faster and perhaps more
responsive ;-) - but besides that point ?]
[...]
In the case of the debugger, I'm often in the same case, because
I don't use it that often. Still, typing in "help" takes less
time than searching through untold menus.
Yes I know what you mean, though I think the browser it's commonly the
fastest tool to get any information quickly ;-) - at least under Windows.
[...]
I used to think that was true. And since I've been working
under Windows, some things have surprised me. But although I'm
beginning to know (and understand) the Windows world, I'm still
far more productive under Unix. And that's true for the vast
majority of programmers I've worked with.
Well I think both "worlds" have evolved much and both have good tool
sets. But I think both "worlds" and tools are quite different.
[...]
Sometimes. Sometimes not. I've not been able to make it show
them systematically, everytime I step out of a function. And
since I use a fairly functional style of programming a lot,
that's a killer in my book.
Depends, if you debug applications built with release configuration then
yes, commonly you won't see the return values, since the functions don't
exist anymore, because they have been removed by the global optimizer.
But I don't think that is different under Unix - is it ?
For debug builds I hadn't that much problems, rather with automatic stl
expansion in combination with complex template classes.
[...]
I'm glad to hear it. But where does it put the core dump. And
There are 2 types of dumps (same format - but handling is different):
Process dumps:
Either you write it by yourself. You can register a callback function in
your application and you will get called and with a utility function you
may write the dump by yourself.
If you don't do anything Windows Error Reporting will start and the dump
files will be written to a temp directory and the dialog will list the
information which is ready to be sent to a central server.
If you have a look at the list, there should be a dump file in this list
too. This is the dump file.
These dumps can be loaded and debugged directly under Visual Studio or
Windows Debugger.
Core / System dumps: Windows BSOD - Blue Screen Of Death
Settings depend on the system. IIRC for Windows Vista and higher they
are enabled by default, under Windows XP you have to enable them.
It can be activated and the default path where it's written to can be
configured under: Right Click - My Computer - Properties - Advanced -
Startup and Recovery. Or Google "configure minidumps windows" should
give you a more detailed explanation.
These dumps can be analyzed only with Windows Debugger.
why don't any of the Windows specialists where I work know about
it.
I don't know. Sadly only few Windows developers know dump files and how
much they can help to track errors quickly. Also there are other
compiler vendors (a famous Windows pascal compiler for example), which
don't support Microsoft Debug Format and therefore analyzing dump files
of these applications is tedious.
Most of the Windows developers try to track down errors by trying to
reproduce the problems in the IDE / debugger, but don't realize that
there's a much better and much faster way to do it.
And only few know what's the context menu in the task manager:
"Write dump file" for, when you right click an applications name in the
task manager of Windows Vista and above.
Also I have the odd feeling, that there isn't much interest too.
We had a problem with a compiler vendor (>not< Microsoft/Intel and not
Open Source) where the C++ linker crashed and we couldn't help
ourselves. We contacted the compiler vendor and he asked us to sent a
sample project (unfortunately it occurred only in our biggest
application and we weren't allowed to sent any information).
I started a discussion in the vendors newsgroup and tried to attract the
attention to other developers, which had a similar problem to vote
for dump file support (either in Microsoft format or in the compiler
vendors format).
But although it would be a huge advantage for the compiler vendor and
the developers there was zero interest in dump files and their benefits:
:-/ :-(
You mean I have to go through Microsoft to get a core dump?
You can optionally, you can register your applications and if they are
registered and any dump file is received at Microsoft it will be stored
on an server, where only the company which has developed the
applications has access too (may be you can register a server address
for the dump files to be stored on your own server - don't know for sure).
But as I wrote - you can do it by yourself.
I prefer this method, though I must admit that it's not that simple
anymore under Windows Vista / Windows 7 - you have to hook a function to
be able to be called before "Windows Error Reporting".
Not a problem for me, but for "dump file starters" for sure.
[...]
This is quite handy to debug deadlocks (where no crash dump is
written).
Unless you send the program a signal to tell it to crash
.
O.k. agreed - one additional possibility to get the dump ;-).
But I don't want to see a clients face and mouth if you tell him "Please
crash the application" ;-)
And the crash happens on your machine, and not the user's (where
no Visual Studios is installed).
I just enter a http address in Visual Studio: e.g.
http:\\server
ort\dump.dmp
and our application (a service) will return a snapshot dump, without
crashing the application. The application still runs and I'm able to
analyze the dump in Visual Studio.
Definitely. Even under Solaris, I'd use Sun's debugger with Sun
OS, and gdb with g++. Which is a pain.
I'm rarely interested in a variable; I want an expression. (As
I said, my style is often functional, and there just aren't many
variables.)
Expressions are evaluated too. Complex function calls (calling C++
functions from the debugger) have either a complex syntax or aren't
possible (depends).
But due to the side effects, I wouldn't add any function call watches
anyways ;-).
That's the one I didn't know. How do you activate it, and can I
There a 2 different command windows:
1) View - Other Windows - Command Window
To be able to control the IDE from the command line (compiling etc.)
2) Immediate Window
To evaluate variables and expressions.
Either enter "immed" in the Command Window or if you debug an
application use the menu: "Debug Windows - Immediate"
or by pressing CTRL - D + I (but depends on your configuration).
enter an arbitrary expression?
Yes, as I wrote calling functions of your application is not that simple
(name mangling :-/ and namespaces) if the function is not visible in the
current context / callstack.
But any other expressions can be evaluated without any problems (at
least the simple ones I entered - I don't use that feature extensively -
;-) ]
[...]
If it really works, it sounds like you'd get the best of both
worlds. Use an IDE when it's convenient, but have full access
to all of the power of the system when it's not.
Yes, IMHO each developer should and can choose his own and best
developing style. Some prefer command line tools, some IDEs and some use
both.
I think both (or three) styles are equally productive - in some cases an
IDE is better in other cases command line tools are better. Depends on
the developer and the type of the application - IMHO.
Andre