Skip to content

Update documentation for cwd - #897

Merged
Connor Peet (connor4312) merged 2 commits into
microsoft:masterfrom
jasonwilliams:patch-1
Jan 4, 2021
Merged

Connor Peet (connor4312) merged 2 commits into
microsoft:masterfrom
jasonwilliams:patch-1

Conversation

@jasonwilliams

Copy link
Copy Markdown
Contributor

Update documentation after changes made in 158eabf

Comment thread OPTIONS.md
<h5>Default value:</h4><pre><code>[]</pre></code><h4>continueOnAttach</h4><p>If true, we&#39;ll automatically resume programs launched and waiting on <code>--inspect-brk</code></p>
<h5>Default value:</h4><pre><code>false</pre></code><h4>customDescriptionGenerator</h4><p>Customize the textual description the debugger shows for objects (local variables, etc...). Samples:<br> 1. this.toString() // will call toString to print all objects<br> 2. this.customDescription ? this.customDescription() : defaultValue // Use customDescription method if available, if not return defaultValue<br> 3. function (def) { return this.customDescription ? this.customDescription() : def } // Use customDescription method if available, if not return defaultValue<br> </p>
<h5>Default value:</h4><pre><code>undefined</pre></code><h4>customPropertiesGenerator</h4><p>Customize the properties shown for an object in the debugger (local variables, etc...). Samples:<br> 1. { ...this, extraProperty: &#39;12345&#39; } // Add an extraProperty 12345 to all objects<br> 2. this.customProperties ? this.customProperties() : this // Use customProperties method if available, if not use the properties in this (the default properties)<br> 3. function () { return this.customProperties ? this.customProperties() : this } // Use customDescription method if available, if not return the default properties<br><br> Deprecated: This is a temporary implementation of this feature until we have time to implement it in the way described here: <a href="https://github.com/microsoft/vscode/issues/102181">https://github.com/microsoft/vscode/issues/102181</a></p>
<h5>Default value:</h4><pre><code>undefined</pre></code><h4>cwd</h4><p>Absolute path to the working directory of the program being debugged.</p>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file is autogenerated from strings.ts -- can you update the doc there?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The strings.ts file doesn't have node.attach.cwd so i don't know where that bit is coming from?
i only see node.launch.cwd and browser.launch.cwd

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

strings.ts is consumed in generate-contributions.ts, which is what the docs are actually created from. node.launch.cwd is shared in there between launch and attach -- the string naming is sort of a mess, in part because it contains strings copied from the previous debug adapters which were not consistent.

@jasonwilliams

Jason Williams (jasonwilliams) commented Dec 17, 2020 •

Copy link
Copy Markdown
Contributor Author

Sure np

Also while I was looking at the documentation i noticed outFiles uses ${workspaceFolder}/**/**.
Is it possible to do something similar to cwd and use localRoot/**/** if set?

I ask this because those working in a monorepo probably won't know to set outFiles to be scoped down and by default (according to the docs) it will search every folder within the workspace. I had this problem a year ago but i think you fixed it some other way?

@connor4312

Copy link
Copy Markdown
Member

There's a possibility for regression there -- I could set my roots to point to ${workspaceFolder}/src, which would work correctly with the source paths, but the sourcemaps can be outside of that.

@jasonwilliams

Copy link
Copy Markdown
Contributor Author

updated

@connor4312

Copy link
Copy Markdown
Member

Thanks!

@connor4312
Connor Peet (connor4312) merged commit 2ed8192 into microsoft:master Jan 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants