> [...]
>> Why is knowing whether the debugger is attached or not important?
>
> to at least save it in different files for a start,
> then hopefully compare it in the program,
> so I can see where its not doing exactly the same thing ...
I would personally not worry about checking for the debugger being
attached, and just save the files twice, renaming the first one before I
run the program again to generate the second one. Since the code is
diagnostic-only, why complicate things by introducing a new dependency?
Of course, it would be important to write the data out as text. But if
you do that, it should be very easy to do a direct comparison (I'd
probably use Windiff, which comes with Visual Studio, as it will detect
and display all of the differences for you in an easy-to-use UI).
> can I re atatch the debugger ?
You should be able to attach to the process from within VS, yes...and as
far as I know, the Debugger.IsAttached property will update to reflect the
current state.
But you'll find out soon enough if that's not true, assuming you do go
ahead and include debugger-attached-specific code. :)
Pete
colin - 05 Jan 2008 13:49 GMT
>> [...]
>>> Why is knowing whether the debugger is attached or not important?
[quoted text clipped - 7 lines]
> run the program again to generate the second one. Since the code is
> diagnostic-only, why complicate things by introducing a new dependency?
I didnt think of that but having the name indicate wether its attached is
reassuring.
> Of course, it would be important to write the data out as text. But if
> you do that, it should be very easy to do a direct comparison (I'd
> probably use Windiff, which comes with Visual Studio, as it will detect
> and display all of the differences for you in an easy-to-use UI).
I added more and more data to the dump,
only finding a few diferences in floats of +/- 1 to 3 in the last of 7
digits,
but then noticed Xna.Framework.Ray.IntersectPlane was returning null in one
but not the other,
wich affected wether it thought surfaces were hidden or not wich explains
the visual differences.
it does a ray trace from a point wich is intended to be inside the model to
the point of interest
then checks that ray against every surface to determine if its behind that
surface or not.
there didnt seem to be a pattern so I dumped every call to it.
so I now have 2 x 45mb of data to compare,
Windiff has been churning cpu time for the last 1/2 hour trying to expand
the comparisons
lol... although the windiff I have came with Visual studio v6
I also have WinMerge but that spends ages at 100% cpu too
>> can I re atatch the debugger ?
>
[quoted text clipped - 4 lines]
> But you'll find out soon enough if that's not true, assuming you do go
> ahead and include debugger-attached-specific code. :)
bah i have the express version seems its not available ...
no wonder I cldnt find it.
Colin =^.^=