繁体   English   中英

在VS2017中调试Aurelia webpack typescript应用程序

[英]Debug Aurelia webpack typescript application in VS2017

我做了以下步骤:

  1. 下载了Aurelia WebPack 2打字稿骨架。
  2. 通过运行yarn install安装所有节点模块。
  3. 在Visual Studio 2017中打开项目文件夹。
  4. Task Runner找到了package.json ,我可以成功启动任务

现在我不知道如何启动应用程序并告诉Visual Studio 2017调试它。

请帮忙。

更新这是我在调试菜单中看到的:

在此输入图像描述

将以下突出显示的行和RunWebPack目标添加到我的.csproj文件中:

<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>

还要在调试期间打开“模块”窗口,并检查它是否包含有关哪些符号遇到此问题的更详细信息。

还请在> ToolS-> Options-> Debugging下启用Microsoft Symbol Servers,再次进行调试。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM