ndb
ndb copied to clipboard
Add folder to workspace doesn't work
It seems that Add folder to workspace doesn't work as of now under Ubuntu 16.04. I've didn't have the chance to test it under another linux flavor yet.
Steps to reproduce
Tell us about your environment:
- ndb version:
v1.0.15
- Platform / OS version: Linux x64 / Ubuntu 16.04 kernel 4.4.0-131-generic
- Node.js version:
8.10.0
What steps will reproduce the problem?
Either:
- click on
Add folder to Workspace
button - right click in the workspace explorer and select
Add project to workspace
.
What is the expected result?
That a modal window open allowing the user to select a folder
What happens instead?
Nothing
I prefer to remove this button and context menu item then fix it. Could you describe your use case? Currently, you can go to the target folder and run another instance of ndb there, would it work for you?
Hi @ak239,
About my use case
I was debugging a globally installed module (npm-consider
) from a project directory as it's the main use case of that module. Think is the workspace was scoped to my project directory and I couldn't have see the globally installed module directory. I wanted to add the sources of npm-consider so that I could put breakpoints on it's sources.
I am going to have a look at the second instance suggestion. The only downside I can see is that it will consume quite a few resources (for some reason, when I launch ndb
it slows down my computer during it's launch - for instance webpages can't be displayed in firefox during it's launch).
The same situation is reproduced when you try to use "Save as" for a file.
I can confirm this bug appears in our systems too, so cannot use ndb
in Ubuntu.
I can also confirm the same issue on Ubuntu 16.04. It started with latest update. On older version it works fine.
same problem in windows
Not work on my mac too.
There is no response when i click Add folder to workspace
and same from another Mac user too - ndb v1.0.24
I prefer to remove this button and context menu item then fix it. Could you describe your use case? Currently, you can go to the target folder and run another instance of ndb there, would it work for you?
Maybe this helps as one example: I'm running tests against code in folder1 of a monorepo that has a dependency on a client that is built in runtime from code in folder2 in another (filesystem) branch of the monorepo. In order for ndb to see both filesets to set appropriate breakpoints, i'd have to navigate up to a mutually shared folder of folder1 and folder2 to run ndb
.
One problem preventing that from working, is that I can't see the contents of folder2 in ndb's treeview unless i cd
into that folder and run ndb
, since the foldername begins with an @
.
Another problem is I need to run the tests defined in the package.json of folder1. If I could use chrome tools to 'add folder to workspace', it would be trivial to do what I want to do.
I don't understand your suggestion to open two instances of ndb
, since they won't trigger each other's breakpoints? I need to trigger breakpoints in folder2 by running code in folder1.
Seeing this too, lately ndb 1.0.28 node.js 11.20, macos 10.14.1 I did reinstall ndb after upgrade Node.js, just in case it was a native module thing, but this didn't fix it
Just updated to ndb 1.0.33, and the "Add folder to workspace" is still broken, but if you wait 5-10 seconds, then it does automatically add the current working directory to the workspace, which is sufficient to set breakpoints (confirmed working), etc So, yay! Thanks for fixing this, at least this part!
@jokeyrhyme could you elaborate? How can you switch CWD from under ndb?
- If I use the node repl in NDB to
process.chdir("newJsDir")
, ndb doesn't care - If I go to the terminal in NDB and CD to a different directory,
PRINTENV
in terminal shows$PWD
has changed, but NDB doesn't care
@tonywoode I don't change the CWD at all
I cd
to my project first, then ndb
, then ndb launches but doesn't have any source code files loaded, and the "Add folder to workspace" button still does nothing (it would still be nice for this to be fixed), but ... if I wait 5-10 seconds, then it loads my project's source code files by itself
So, for most of my use cases, it doesn't matter that the "Add folder to workspace" button is broken
I understand. I wish to add files from folders above NDB's current dir!