Skip to content

Commit

Permalink
Merge pull request #128 from rainers/master
Browse files Browse the repository at this point in the history
Visual D 1.0.1-beta1
  • Loading branch information
rainers authored Jul 19, 2020
2 parents 3d9cac6 + 956bf0c commit 92ec7a2
Show file tree
Hide file tree
Showing 17 changed files with 180 additions and 80 deletions.
12 changes: 11 additions & 1 deletion CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -1242,7 +1242,7 @@ Version history
- vcxproj: do not check referenced projects if the project itself already needs phobos to be linked
- vcxproj: only print the filename in the "Compiling" message, not the path

unreleased version 1.0.0
2020-07-04 version 1.0.0
* projects:
- trailing \ now removed from $(WindowsSDKVersion)/$(UCRTVersion) for more consistency between
autodetected version and as read from the environment
Expand All @@ -1267,3 +1267,13 @@ unreleased version 1.0.0
- some performance improvements by caching some data while the debuggee is stopped
* installer:
- full installer now bundled with dmd 2.092.1 and LDC 1.22.0

unreleased version 1.0.1
* projects:
- bugzilla 21024: VS2017/2019 new project: fixed unrelated files listed in New Project Dialog
- bugzilla 21028: project templates not visible when VS started as standard/restricted user
* dmdserver:
- updated to dmd 2.093
- fixed showing documentation for template functions
* mago debugger expression evaluator:
- fixed wrong values displayed eventually when switching stack frames
6 changes: 3 additions & 3 deletions VERSION
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#define VERSION_MAJOR 1
#define VERSION_MINOR 0
#define VERSION_REVISION 0
#define VERSION_BETA
#define VERSION_BUILD 0
#define VERSION_REVISION 1
#define VERSION_BETA -beta
#define VERSION_BUILD 1
46 changes: 44 additions & 2 deletions doc/Debugging.dd
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,7 @@ $(P Using Mago's expression evaluator allowed to implement this for D pretty eas
$(P The debugger engine needs to detect the source language of the code location. This information
is added to the debug information starting with dmd 2.072 when compiled for COFF object
files (-m64 or -m32mscoff) with -g, but not with
-gc, i.e. you should select debug info for Mago even when using the VS debug engine.) Unfortunately,
LDC does not yet emit this source language information.
-gc, i.e. you should select debug info for Mago even when using the VS debug engine.)

<a id="recommendation"></a>
$(H3 Recommendation for VS 2015 or later)
Expand Down Expand Up @@ -121,5 +120,48 @@ $(IMG_CENTER images/d_exceptions.png)

Please note that these specific exception settings only apply to the Mago debug engine, not the Concord extension.

<a id="customization"></a>
$(H2 Debugger Customization)

$(P Starting with Visual D 1.0 the display of structs and classes can be customized in the mago expression evaluator
for the Concord debugger engine (when using dmd as the copiler). This is done by enabling
"Call struct/class methods __debug[Overview|Expanded|Visualizer]" in the global mago Debugging options for mago
and adding some extra methods or fields to the declaration of the struct or class:)

$(UL
$(LI `__debugOverview` will be evaluated to display the single line representation in the watch, locals or auto window.)
$(LI `__debugExpanded` will be evaluated to display the expanded list of members in the watch, locals or auto window.)
$(LI `__debugStringView` will be evaluated to populate the text visualizer window.)
)

$(P The type of the return value determines what fields are displayed. Here is an example session:)

<div align="center"><img src="images/debugeval.png" width="90%"/></div>

$(P Instead of functions you can also define the __debug* properties as fields that are eagerly filled by the regular code.
You must not alias other members because that information is not available in the debug information.)

$(P The JSON Visualizer window was opened by clicking the focused lense in the Autos window.
As with other special display functionality, the function evaluation can be disabled by appending ",!" to
the expression as shown in the watch window.)

$(P While executing these functions for display, the GC is switched to a region allocator that discards all memory
when excution of the debuggee is resumed (this can be disabled in the global debugger options with setting
"Switch GC while executing debugger functions"). So you should
not keep references to memory allocated during execution of the __debug* functions.)

$(H3 Displaying Ranges)

$(P Enabling mago debugger option "Call range methods to show elements in overview/expansion" activates function evaluation of
methods `save`, `empty`, `front` and `popFront` if they all exist. This allows displaying forward ranges as
a list of their elements.)

<div align="center"><img src="images/debugranges.png" width="90%"/></div>

$(P This is currently considered experimental, because it is rather slow.)

$(P Known issue: if `front` returns a reference to the element, the wrong value is displayed. This is caused by bad
debug information.)

Macros:
TITLE=Debugging
Binary file added doc/images/debugeval.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/images/debugranges.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion nsis/Extensions_vs12/extension.vsixmanifest
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<InstallationTarget Version="[12.0,17.0)" Id="Microsoft.VisualStudio.Pro" />
<InstallationTarget Version="[12.0,17.0)" Id="Microsoft.VisualStudio.IntegratedShell" />
<InstallationTarget Version="[12.0,17.0)" Id="Microsoft.VisualStudio.Enterprise" />
<InstallationTarget Version="[12.0,17.0)" Id="Microsoft.VisualStudio.Commuunity" />
<InstallationTarget Version="[12.0,17.0)" Id="Microsoft.VisualStudio.Community" />
</Installation>
<Assets>
<Asset Type="Microsoft.VisualStudio.VsPackage" Path="visuald.pkgdef" />
Expand Down
2 changes: 1 addition & 1 deletion nsis/Extensions_vs15/extension.vsixmanifest
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<InstallationTarget Version="[12.0,17.0)" Id="Microsoft.VisualStudio.Pro" />
<InstallationTarget Version="[12.0,17.0)" Id="Microsoft.VisualStudio.IntegratedShell" />
<InstallationTarget Version="[12.0,17.0)" Id="Microsoft.VisualStudio.Enterprise" />
<InstallationTarget Version="[12.0,17.0)" Id="Microsoft.VisualStudio.Commuunity" />
<InstallationTarget Version="[12.0,17.0)" Id="Microsoft.VisualStudio.Community" />
</Installation>
<Assets>
<Asset Type="Microsoft.VisualStudio.VsPackage" Path="visuald.pkgdef" />
Expand Down
3 changes: 2 additions & 1 deletion nsis/replaceinfile.nsh
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ Function RIF
IfFileExists $2 +1 RIF_error ; knock-knock
FileOpen $R0 $2 "r" ; open the door

GetTempFileName $R2 ; who's new?
GetFullPathName $R1 $2\.. ; same folder as source file
GetTempFileName $R2 $R1 ; Put temporary file in same folder to preserve access rights
FileOpen $R1 $R2 "w" ; the escape, please!

RIF_loop: ; round'n'round we go
Expand Down
2 changes: 1 addition & 1 deletion nsis/visuald.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

; define DMD source path to include dmd installation
; !define DMD
!define DMD_VERSION "2.092.1"
!define DMD_VERSION "2.093.0"
!define DMD_SRC c:\d\dmd-${DMD_VERSION}

; define LDC to include ldc installation
Expand Down
18 changes: 1 addition & 17 deletions stdext/stdext.visualdproj
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
<preservePaths>0</preservePaths>
<warnings>0</warnings>
<infowarnings>0</infowarnings>
<checkProperty>0</checkProperty>
<genStackFrame>0</genStackFrame>
<pic>0</pic>
<cov>0</cov>
Expand Down Expand Up @@ -164,7 +163,6 @@
<preservePaths>0</preservePaths>
<warnings>0</warnings>
<infowarnings>0</infowarnings>
<checkProperty>0</checkProperty>
<genStackFrame>0</genStackFrame>
<pic>0</pic>
<cov>0</cov>
Expand Down Expand Up @@ -288,7 +286,6 @@
<preservePaths>0</preservePaths>
<warnings>0</warnings>
<infowarnings>0</infowarnings>
<checkProperty>0</checkProperty>
<genStackFrame>0</genStackFrame>
<pic>0</pic>
<cov>0</cov>
Expand Down Expand Up @@ -412,7 +409,6 @@
<preservePaths>0</preservePaths>
<warnings>0</warnings>
<infowarnings>0</infowarnings>
<checkProperty>0</checkProperty>
<genStackFrame>0</genStackFrame>
<pic>0</pic>
<cov>0</cov>
Expand Down Expand Up @@ -536,7 +532,6 @@
<preservePaths>0</preservePaths>
<warnings>0</warnings>
<infowarnings>0</infowarnings>
<checkProperty>0</checkProperty>
<genStackFrame>0</genStackFrame>
<pic>0</pic>
<cov>0</cov>
Expand Down Expand Up @@ -660,7 +655,6 @@
<preservePaths>0</preservePaths>
<warnings>0</warnings>
<infowarnings>0</infowarnings>
<checkProperty>0</checkProperty>
<genStackFrame>0</genStackFrame>
<pic>0</pic>
<cov>0</cov>
Expand Down Expand Up @@ -784,7 +778,6 @@
<preservePaths>0</preservePaths>
<warnings>0</warnings>
<infowarnings>0</infowarnings>
<checkProperty>0</checkProperty>
<genStackFrame>0</genStackFrame>
<pic>0</pic>
<cov>0</cov>
Expand Down Expand Up @@ -908,7 +901,6 @@
<preservePaths>0</preservePaths>
<warnings>0</warnings>
<infowarnings>0</infowarnings>
<checkProperty>0</checkProperty>
<genStackFrame>0</genStackFrame>
<pic>0</pic>
<cov>0</cov>
Expand Down Expand Up @@ -1032,7 +1024,6 @@
<preservePaths>0</preservePaths>
<warnings>0</warnings>
<infowarnings>0</infowarnings>
<checkProperty>0</checkProperty>
<genStackFrame>0</genStackFrame>
<pic>0</pic>
<cov>0</cov>
Expand Down Expand Up @@ -1156,7 +1147,6 @@
<preservePaths>0</preservePaths>
<warnings>0</warnings>
<infowarnings>0</infowarnings>
<checkProperty>0</checkProperty>
<genStackFrame>0</genStackFrame>
<pic>0</pic>
<cov>0</cov>
Expand Down Expand Up @@ -1280,7 +1270,6 @@
<preservePaths>0</preservePaths>
<warnings>0</warnings>
<infowarnings>0</infowarnings>
<checkProperty>0</checkProperty>
<genStackFrame>0</genStackFrame>
<pic>0</pic>
<cov>0</cov>
Expand Down Expand Up @@ -1404,7 +1393,6 @@
<preservePaths>0</preservePaths>
<warnings>0</warnings>
<infowarnings>0</infowarnings>
<checkProperty>0</checkProperty>
<genStackFrame>0</genStackFrame>
<pic>0</pic>
<cov>0</cov>
Expand Down Expand Up @@ -1524,11 +1512,10 @@
<useSwitchError>0</useSwitchError>
<useUnitTests>0</useUnitTests>
<useInline>1</useInline>
<release>0</release>
<release>1</release>
<preservePaths>0</preservePaths>
<warnings>0</warnings>
<infowarnings>0</infowarnings>
<checkProperty>0</checkProperty>
<genStackFrame>0</genStackFrame>
<pic>0</pic>
<cov>0</cov>
Expand Down Expand Up @@ -1652,7 +1639,6 @@
<preservePaths>0</preservePaths>
<warnings>0</warnings>
<infowarnings>0</infowarnings>
<checkProperty>0</checkProperty>
<genStackFrame>0</genStackFrame>
<pic>0</pic>
<cov>0</cov>
Expand Down Expand Up @@ -1776,7 +1762,6 @@
<preservePaths>0</preservePaths>
<warnings>0</warnings>
<infowarnings>0</infowarnings>
<checkProperty>0</checkProperty>
<genStackFrame>0</genStackFrame>
<pic>0</pic>
<cov>0</cov>
Expand Down Expand Up @@ -1900,7 +1885,6 @@
<preservePaths>0</preservePaths>
<warnings>0</warnings>
<infowarnings>0</infowarnings>
<checkProperty>0</checkProperty>
<genStackFrame>0</genStackFrame>
<pic>0</pic>
<cov>0</cov>
Expand Down
2 changes: 1 addition & 1 deletion vdc/dmdserver/dmd
Submodule dmd updated 269 files
9 changes: 6 additions & 3 deletions vdc/dmdserver/dmdserver.d
Original file line number Diff line number Diff line change
Expand Up @@ -988,7 +988,7 @@ class DMDServer : ComObject, IVDServer
Module.rootModule = rootModule.analyzedModule;
Module.loadModuleHandler = (const ref Loc location, IdentifiersAtLoc* packages, Identifier ident)
{
return Module.loadFromFile(location, packages, ident);
return Module.loadFromFile(location, packages, ident, 0, 0);
};

for (size_t i = 0; i < mModules.length; i++)
Expand Down Expand Up @@ -1190,7 +1190,10 @@ unittest
}

string tip = detachBSTR(bstrTip);
assert(tip == expected_tip);
if (expected_tip.endsWith("..."))
assert(tip.startsWith(expected_tip[0..$-3]));
else
assert(tip == expected_tip);
}

void checkDefinition(int line, int col, string expected_fname, int expected_line, int expected_col)
Expand Down Expand Up @@ -1265,7 +1268,7 @@ unittest
}

checkTip(5, 9, "(local variable) `int xyz`");
checkTip(6, 9, "`void std.stdio.writeln!(int, int, int)(int _param_0, int _param_1, int _param_2) @safe`");
checkTip(6, 9, "`void std.stdio.writeln!(int, int, int)(int _param_0, int _param_1, int _param_2) @safe`...");
checkTip(7, 12, "(local variable) `int xyz`");

version(traceGC)
Expand Down
14 changes: 7 additions & 7 deletions vdc/dmdserver/dmdserver.visualdproj
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@
<addDepImp>1</addDepImp>
<program>c:\l\d\dmd2\windows\bin\dmd.exe</program>
<imppath>dmd\src ..\..</imppath>
<fileImppath>dmd dmd\res</fileImppath>
<fileImppath>dmd dmd\src\dmd\res</fileImppath>
<outdir>..\..\bin\$(ConfigurationName)\$(PlatformName)</outdir>
<objdir>$(OutDir)\$(ProjectName)</objdir>
<objname />
Expand Down Expand Up @@ -439,7 +439,7 @@
<addDepImp>0</addDepImp>
<program>$(DMDInstallDir)windows\bin\dmd.exe</program>
<imppath>dmd\src ..\..</imppath>
<fileImppath>$(OutDir) ..\..\res</fileImppath>
<fileImppath>dmd dmd\src\dmd\res</fileImppath>
<outdir>..\..\bin\$(ConfigurationName)\$(PlatformName)</outdir>
<objdir>$(OutDir)\$(ProjectName)</objdir>
<objname />
Expand Down Expand Up @@ -685,7 +685,7 @@
<addDepImp>0</addDepImp>
<program />
<imppath>dmd\src ..\.. $(DMDInstallDir)\src\druntime\src</imppath>
<fileImppath>dmd dmd\res</fileImppath>
<fileImppath>dmd dmd\src\dmd\res</fileImppath>
<outdir>..\..\bin\$(ConfigurationName)\$(PlatformName)</outdir>
<objdir>$(OutDir)\$(ProjectName)</objdir>
<objname />
Expand Down Expand Up @@ -931,7 +931,7 @@
<addDepImp>0</addDepImp>
<program>c:\l\d\dmd2\windows\bin\dmd.exe</program>
<imppath>dmd\src ..\..</imppath>
<fileImppath>dmd dmd\res</fileImppath>
<fileImppath>dmd dmd\src\dmd\res</fileImppath>
<outdir>..\..\bin\$(ConfigurationName)\$(PlatformName)</outdir>
<objdir>$(OutDir)\$(ProjectName)</objdir>
<objname />
Expand Down Expand Up @@ -1177,7 +1177,7 @@
<addDepImp>0</addDepImp>
<program>c:\s\d\dlang\dmd\generated\Windows\Release\x64\dmd.exe</program>
<imppath>dmd\src ..\.. $(DMDInstallDir)\src\druntime\src</imppath>
<fileImppath>dmd dmd\res</fileImppath>
<fileImppath>dmd dmd\src\dmd\res</fileImppath>
<outdir>..\..\bin\$(ConfigurationName)\$(PlatformName)</outdir>
<objdir>$(OutDir)\$(ProjectName)</objdir>
<objname />
Expand Down Expand Up @@ -1423,7 +1423,7 @@
<addDepImp>1</addDepImp>
<program>c:\s\d\rainers\windows\bin\dmd.exe</program>
<imppath>dmd\src ..\.. $(DMDInstallDir)\src\druntime\src c:\s\d\dlang\druntime\src</imppath>
<fileImppath>dmd dmd\res</fileImppath>
<fileImppath>dmd dmd\src\dmd\res</fileImppath>
<outdir>..\..\bin\$(ConfigurationName)\$(PlatformName)</outdir>
<objdir>$(OutDir)\$(ProjectName)</objdir>
<objname />
Expand Down Expand Up @@ -1669,7 +1669,7 @@
<addDepImp>0</addDepImp>
<program>c:\s\d\dlang\dmd\generated\Windows\Release\x64\dmd.exe</program>
<imppath>dmd\src ..\..</imppath>
<fileImppath>dmd dmd\res</fileImppath>
<fileImppath>dmd dmd\src\dmd\res</fileImppath>
<outdir>..\..\bin\$(ConfigurationName)\$(PlatformName)</outdir>
<objdir>$(OutDir)\$(ProjectName)</objdir>
<objname />
Expand Down
Loading

0 comments on commit 92ec7a2

Please sign in to comment.