VS Code에서 strapi 프로젝트 (3.0.0 베타 16.6)를 디버깅하려고합니다. 내 launch.json :
{
"type": "node",
"request": "attach",
"name": "Attach to strapi",
"port": 9229
}
내 package.json :
"scripts": {
"debug": "node --inspect=127.0.0.1:9229 ./node_modules/strapi/bin/strapi.js develop"
}
디버거가 프로세스에 연결되지만 모든 중단 점이 확인되지 않습니다 (빨간색이 아닌 검은 색으로 표시됨). 내 구성에 어떤 문제가 있습니까?
이 답변은 다음 strapi / strapi 문제에서 나옵니다 .
다음 솔루션을 생각해 냈습니다. server.js 파일 (내 사용자 지정 파일)에 다음 스크립트 포함 :
const strapi = require('strapi');
strapi({ dir: process.cwd(), autoReload: true }).start();
다음 명령으로 nodemon을 사용하고 있습니다. nodemon --inspect=0.0.0.0:9228 server.js
이제 9228
디버거로 연결할 수 있습니다 .
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다