Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
alanhe421 opened this issue Dec 19, 2023 · 5 comments
Closed

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

alanhe421 opened this issue Dec 19, 2023 · 5 comments
Assignees
Labels
feature-request Request for new features or functionality
Milestone

Comments

@alanhe421
Copy link
Contributor

alanhe421 commented Dec 19, 2023

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

@alanhe421 alanhe421 added the feature-request Request for new features or functionality label Dec 19, 2023
@cpendery
Copy link
Member

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

@alanhe421
Copy link
Contributor Author

@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
Copy link
Member

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
Copy link
Contributor Author

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
Copy link
Contributor Author

alanhe421 commented Dec 20, 2023

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.

@alanhe421 alanhe421 reopened this Dec 20, 2023
alanhe421 added a commit to alanhe421/inshellisense that referenced this issue Dec 20, 2023
@cpendery cpendery assigned cpendery and alanhe421 and unassigned cpendery Dec 25, 2023
@cpendery cpendery added this to the January 2024 milestone Dec 25, 2023
@cpendery cpendery closed this as completed Jan 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

2 participants