microsoft / inshellisense

IDE style command line auto complete
MIT License
8.22k stars 180 forks source link

Can't I enter the breakpoint through IDE debugging? #130

Closed alanhe421 closed 5 months ago

alanhe421 commented 6 months ago

Is your feature request related to a problem? Please describe. It's better to inspect breakpoint on IDE

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered. If not, I have to use log

cpendery commented 6 months ago

@alanhg, are you referring to debugging during the development of inshellisense?

alanhe421 commented 6 months ago

@alanhg, are you referring to debugging during the development of inshellisense?

yes.I hope to debug in WebStorm, for example, and then enter the breakpoints marked in the code.

cpendery commented 6 months ago

Ah, I'm not sure how to debug in WebStorm, but if you run the npm command npm run debug, it will start up inshellisense with node's inspect enabled. In VSCode, you can attach to it via the > Debug: Attach to Node Process command. Then you can use breakpoints in the typescript code.

alanhe421 commented 6 months ago

Ah, I'm not sure how to debug in WebStorm, but if you run the npm command npm run debug, it will start up inshellisense with node's inspect enabled. In VSCode, you can attach to it via the > Debug: Attach to Node Process command. Then you can use breakpoints in the typescript code.

debug is okay now in Visual Studio Code, thank you very much. As for WebStorm, I will study it further.

alanhe421 commented 6 months ago

Ah, I'm not sure how to debug in WebStorm, but if you run the npm command npm run debug, it will start up inshellisense with node's inspect enabled. In VSCode, you can attach to it via the > Debug: Attach to Node Process command. Then you can use breakpoints in the typescript code.

solution

  1. remove inspect option
  2. webstorm's debug click
  3. it's ok to debug image

I believe don't should to configure 'inspect' in the command script, We can operate directly in the IDE, or add a 'start' command.

directly configured 'inspect', so the IDE might not be able to capture this debug link, which is why it can't enter the breakpoint.

Advice

"start": "node --loader ts-node/esm src/index.ts"

The original 'start' command executed directly from the build directory, is that necessary? If not, I suggest switching it to TypeScript directly.

I submit a pr, maybe like this?

thanks.