我在https://dev.office.com/sharepoint/docs/spfx/web-parts/get-started/build-a-hello-world-web-part中完成了HelloWorld webpart,并在https://dev.office.com/sharepoint/docs/spfx/web-parts/get-started/connect-to-sharepoint之后增强了该webpart以连接到SharePoint . 在localhost中一切正常,但与我的开发租户无法连接到SharePoint(基本的HelloWorld webpart在那里工作) .
我正在使用VSCode 1.7.2;节点6.5.0;壳牌1.3.8;和渲染器52.0.274382 .
我使用node.js生成了一个新的launch.json并更正了“program”:“$ \ src \ webparts \ helloworld \ HelloWorldWebPart.ts”
当我启动程序时,我得到:“不能lanch程序......;设置'outFiles'属性可能有帮助 . ”
我输入了“outFiles”:[“$ \ lib \ webparts \ helloworld \ HelloWorldWebPart.ts”],但我仍然得到完全相同的错误 .
接下来,我尝试了Attach to Process:首先我运行命令Tasks:Run Task;服务 . 这打开了Chrome中的localhost页面 . 然后我点击了Attach to Process . 结果:“调试:附加到进程:无法连接到运行时进程,(超时.10000ms后) . ”
我使用的是Azure Windows 10 VM .
非常感谢您的时间,精力和慷慨!
1 回答
Office Dev团队的官方文档:https://dev.office.com/sharepoint/docs/spfx/debug-in-vscode
我在这里找到了非常有用的文章:http://www.eliostruyf.com/how-to-debug-your-sharepoint-framework-web-part
我也在这里创建了一个:http://blog.velingeorgiev.pro/how-debug-sharepoint-framework-webpart-visual-studio-code
请点击launch.json配置:https://gist.github.com/VelinGeorgiev/4a7b77ced7198df0a3898420d46f3405
此处粘贴的配置可供快速参考:
如有任何问题,请告诉我 .