Debug Aurelia webpack typescript app in VS2017
I did the following steps:
- Downloaded Aurelia WebPack 2 typescript skeleton.
- Installed all node modules by running
yarn install
. - The project folder is open in Visual Studio 2017.
- Found Task Runner
package.json
and I can run the task successfully
Now I don't know how to start the application and tell Visual Studio 2017 to debug it.
Please, help.
UPDATE This is what I see in the debug menu:
+3
source to share
1 answer
Add the following highlighted lines and the RunWebPack target to my .csproj file:
<PropertyGroup>
<TargetFramework>netcoreapp1.1</TargetFramework>
<TypeScriptCompileBlocked>true</TypeScriptCompileBlocked>
<IsPackable>false</IsPackable>
</PropertyGroup>
<Target Name="RunWebpack" AfterTargets="ComputeFilesToPublish">
<!-- As part of publishing, ensure the JS resources are freshly built in
production mode -->
<Exec Command="npm install" />
<Exec Command="node node_modules/webpack/bin/webpack.js --config
webpack.config.vendor.js --env.prod" />
<Exec Command="node node_modules/webpack/bin/webpack.js --env.prod" />
<!-- Include the newly-built files in the publish output -->
<ItemGroup>
<DistFiles Include="wwwroot\dist\**" />
<ResolvedFileToPublish Include="@(DistFiles->'%(FullPath)')"
Exclude="@(ResolvedFileToPublish)">
<RelativePath>%(DistFiles.Identity)</RelativePath>
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
</ResolvedFileToPublish>
</ItemGroup>
</Target>
Also open the Modules window while debugging and check if it has more details on what symbols correspond to this problem.
Please also enable Microsoft Symbol Servers under Tools → Options - Debug, debug it again.
0
source to share