diff --git a/.inscode b/.inscode index ecc8bdde946f464a2c4d431d8f8196413737d922..e1777316cc8a34b6c53f0ae12504b6c66fbdb272 100644 --- a/.inscode +++ b/.inscode @@ -1,6 +1,10 @@ run = "npm i && npm run dev" +language = "node" [env] PATH = "/root/${PROJECT_DIR}/.config/npm/node_global/bin:/root/${PROJECT_DIR}/node_modules/.bin:${PATH}" XDG_CONFIG_HOME = "/root/.config" -npm_config_prefix = "/root/${PROJECT_DIR}/.config/npm/node_global" \ No newline at end of file +npm_config_prefix = "/root/${PROJECT_DIR}/.config/npm/node_global" + +[debugger] +program = "main.js" diff --git a/index.js b/index.js index 2d7e6834fb6366b3120c7a37cc5f637bc4a33928..92e20920ec11de4b7808ad9d829f39f22439bb7f 100644 --- a/index.js +++ b/index.js @@ -1 +1,18 @@ -console.log("欢迎来到 InsCode"); \ No newline at end of file +const state = { + a: 1, + setA (count) { + state.a = count + } +}; + +function run () { + const { a, setA } = state + console.log(state.a) + setA(a + 1) + console.log(state.a) +} + +run() +run() +run() +run() \ No newline at end of file