View previous topic :: View next topic |
Author |
Message |
greatgatsby
Joined: 06 Aug 2010 Posts: 10 Location: South Africa (Cape Town)
|
Posted: Wed Jul 27, 2011 6:38 am Post subject: UnitTests & Intellisense for DFL Windows app |
|
|
Hi Rainer,
I've been experimenting with using DFL and the Entice Designer with Visual-D in VS2008.
After some "tuning" to the Visual-D settings everything works quite well with only minor copying+pasting required - you can design the Forms in Entice Designer but do the remainder of coding/debugging in Visual-D. Of course the full integration of Entice (or the Qt Designer for QtD) into VS would be even better , but this is nice enough for now!
But I have 2 issues with coding in Visual-D that I cannot seem to resolve:
1. I've made a separate Configuration to include Debug info + UnitTests. This works fine, but when an assert statement throws inside a UnitTest, VS pops up a MessageBox with a message like this (note the "break when exception is" Win32 E0440001 D exception is ticked under Debug|Exceptions.):
Code: | First-chance exception at 0x7c812afb in AtrAnalyzer.exe: 0xE0440001: D Exception. |
If you press 'Continue', VS just silently aborts the app. IF you press 'Break', VS warns that there is "no source for the current location", from where you can only (1) abort the app or (2) press F5 to run the app - which also simply aborts the app.
I assume this is because the exceptions are caught by the D runtime, but is there not a better/easier way to see which Assert call actually threw?
Note that this is not related to DFL - this behaviour is consistent across all D apps in Visual-D.
2. The 'Intellisense' feature to show the members of a class/structure object reference does not work. For instance if I have a class AA and a reference to the class aa, when I type the 'aa.' it does not show a pop-up with all the members for 'aa'. Note that my Tools|Options|Text Editor|D|Statement Completion 'Auto List members' option is ticked.
I can still press 'Ctrl+Space' to get the 'Import' pop-ups, but that is overkill most of the time since I am only interested in the members of the class.
I am successfully generating the JSON file for the project ($(IntDir)\$(TargetName).json in the Project Properties). I have also added JSON generation to the DFL compiler settings to generate the DFL library, which is then copied to the Global JSON path.
I have also experimented with copying the project JSON file to the Global JSON path in Tools|Options|Projects and Solutions|Visual D Settings ($(DMDInstallDir)\JSON), but I still get the same behaviour.
Any idea what is the problem or any advice? |
|
Back to top |
|
|
sagitario
Joined: 03 Mar 2007 Posts: 292
|
Posted: Sun Aug 07, 2011 1:43 pm Post subject: |
|
|
Hi,
sorry for the late reply, but I've been on vacation for some weeks.
1. The problem with the missing callstack for exceptions is a known issue (see also ticket #13 http://www.dsource.org/projects/visuald/ticket/13 ). The current work-around for me is
- build phobos.lib with debug symbols
- load symbols for the dlls on the callstack from the microsoft symbol server
2. There currently is no completion with semantic information. The expansions given are just identifiers from the currently edited text buffer and from the json files that start with the characters at the caret position.
I hope this clarifies it,
Rainer |
|
Back to top |
|
|
greatgatsby
Joined: 06 Aug 2010 Posts: 10 Location: South Africa (Cape Town)
|
Posted: Thu Aug 18, 2011 7:45 am Post subject: |
|
|
Hi Rainer,
OK. Thanks for the explanation + work-around.
Your Microsoft debug symbols work-around works fine but does slow down the debug session starting with all the symbols been loaded. Oh well, I suppose I don't have to do it every time!
No problem with that vacation - hope you enjoyed it ! |
|
Back to top |
|
|
sagitario
Joined: 03 Mar 2007 Posts: 292
|
Posted: Fri Aug 19, 2011 12:27 am Post subject: |
|
|
greatgatsby wrote: | OK. Thanks for the explanation + work-around.
Your Microsoft debug symbols work-around works fine but does slow down the debug session starting with all the symbols been loaded. Oh well, I suppose I don't have to do it every time! |
After having loaded the most important debug symbols into the cache folder, you can disable the symbol server entry, so VS won't try to fetch unknown pdb files. It still uses the cached symbols.
Quote: | No problem with that vacation - hope you enjoyed it ! |
Sure, I did |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|