Сообщество Visual Studio 2017, версия 15.9.5
Версия узла JS: 10.11.0
Версия Chrome: 69.0.3497.106
Электронная версия: 4.0.1
Использование изменений свойств проекта и проекта, как описано здесь:
https://stackoverflow.com/a/46658784/2388129
как и здесь
https://stackoverflow.com/a/35985306/2388129
Я могу подключиться к отладчику VS и нажать точки останова.
Однако окно приложения Electron не инициализируется должным образом. Я могу только заставить приложение правильно работать через интерактивное окно node.js, выполнив .npm start
.
При запуске в конфигурации отладки и нажатии F5 или Start
в VS я получаю окно консоли, затем иду и присоединяю отладчик. Точки останова достигнуты, но окно приложения Electron выглядит так:

Содержимое файла njsproj проекта:
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
<Name>GitMon</Name>
<RootNamespace>GitMon</RootNamespace>
<SaveNodeJsSettingsInProjectFile>True</SaveNodeJsSettingsInProjectFile>
<NodeExePath>D:\@Documents\My Open Source Repos\GitMon\node_modules\electron\dist\electron.exe</NodeExePath>
<NodeExeArguments>main.js</NodeExeArguments>
<JavaScriptTestFramework>ExportRunner</JavaScriptTestFramework>
<ScriptArguments>--inspect-brk</ScriptArguments>
<DebuggerPort>5858</DebuggerPort>
<NodejsPort>
</NodejsPort>
</PropertyGroup>
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>0e3d7742-5973-41e0-8411-97f609c13491</ProjectGuid>
<ProjectHome>.</ProjectHome>
<StartupFile>main.js</StartupFile>
<StartWebBrowser>False</StartWebBrowser>
<SearchPath>
</SearchPath>
<WorkingDirectory>.</WorkingDirectory>
<OutputPath>.</OutputPath>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<ProjectTypeGuids>{3AF33F2E-1136-4D97-BBB7-1795711AC8B8};{9092AA53-FB77-4645-B42D-1CCCA6BD08BD}</ProjectTypeGuids>
<StartWebBrowser>True</StartWebBrowser>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
<ItemGroup>
<Compile Include="main.js" />
<Compile Include="renderer\badgeHandler.js" />
<Compile Include="renderer\directoryPickerCaller.js" />
<Compile Include="renderer\externalLinkHandler.js" />
<Compile Include="renderer\gitStatusResultDOMHandler.js" />
<Compile Include="renderer\mainDivSizeHandler.js" />
<Compile Include="renderer\preloader.js" />
<Compile Include="renderer\sidenav.js" />
<Compile Include="renderer\titlebar.js" />
<Compile Include="renderer\zoomHandler.js" />
<Compile Include="renderer\_requires.js" />
<Compile Include="store.js">
<SubType>Code</SubType>
</Compile>
<Content Include="css\colors.css" />
<Content Include="css\content.css" />
<Content Include="css\preloader.css" />
<Content Include="css\scrollbar.css" />
<Content Include="css\sidenav.css" />
<Content Include="css\titlebar.css" />
<Content Include="index.html">
<SubType>Code</SubType>
</Content>
<Content Include="package.json" />
</ItemGroup>
<ItemGroup>
<Folder Include="css\" />
<Folder Include="renderer\" />
</ItemGroup>
<!-- Do not delete the following Import Project. While this appears to do nothing it is a marker for setting TypeScript properties before our import that depends on them. -->
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\TypeScript\Microsoft.TypeScript.targets" Condition="False" />
<Import Project="$(VSToolsPath)\Node.js Tools\Microsoft.NodejsTools.targets" />
</Project>
Я ценю помощь!