My Suggestions / Bugs Thread

It’s been a while! :frowning:
You know, in this thread I’m bitching a lot, but don’t get me wrong here: Studio3T is awesome, works very well, does have tons of features and is an invaluable working tool. I just want you to imporve even further! :slight_smile:
With that in mind, here are some things that built-up in the last months, I just coulnd’t find enough free time to write it down. Until now.

  1. IntelliShell problem: Print adds two(!) new lines (1. go to new line 2. add blank line) after the specified output. Multiple prints without blank line in between only possible with one print + multiple \n chained or workaround: Shell Output avoid new lines - #5 by SchurigH
    1
    But if you look at my 6th point regarding switch case - there all prints come without newline at all… wtf?! Just noticed that.

  2. IntelliShell suggestions: There is a cool feature here: “Run selection (F9)” - it’s nice to test parts of a bigger script this way instead copy pasting everytime into different IntelliShell instances. BUT: If I’m using variables (which I do, of course), I always have to copy paste all variables right before the tested part to also select these. Otherwise the code won’t work. It would be nice to either be able to set global IntelliShell variables or keep variable values between runs.

  • Global variables for a single IntelliShell tab and kind of super-global (…) variables for all IntelliShell tabs. You would set these up in some setting dialog, apart from the code and use them in the code.
  • Or there is a mode in which an IntelliShell script tab saves variable values between different runs. So I run all code before my testing part, variables get all their values, after that I could execute my code lines seperately and all variables would still have their values of the last run(s). Such setting might be worth auto-disabling for each newly opened IntelliShell tab because this type of variable behaviour would be very unusual and result in errors of not used purposely.
    2
  1. Visual Query Builder problem: One of my first reported problems still exist: The yellow popup on ObjectID-Drag&Drop actions: My Suggestions / Bugs Thread - it still annoys me.

  2. IntelliShell error detection seems broken:

console.log("test")
/db.getCollection("users").updateMany({ schoolId: fromSchool }, { $unset: { roles: "" } })
db.getCollections("users").updateMany({ schoolId: toSchool }, { $unset: { roles: "" } })

contains three errors: Slash in front of line 2, “getCollections” in line 3 and unknown variables in these lines. No errors detected by IntelliShell. Same for a coworker with this code. Console.log can also be print(…), same result.
If I remove line 1, the slash as 1 error is detected, no other errors. If I then remove the slash, no errors are detected but run the code and

Uncaught
ReferenceError: fromSchool is not defined
Uncaught
TypeError: db.getCollections is not a function

will be the output. If you take my example code from above and put a “;” at the end of console.log, everything will be an error.
I have bigger scripts where no errors are detected anymore even if there are dozens.

  1. It is not possible to save a new IntelliShell script as an existing one (and overwrite that). To work around you can manually enter the name of an existing script into “Script name”, it will recognize it correctly. After that has been saved once, you can select existing scripts and overwrite them as you would expect it to.

  2. Switch case break won’t work in IntelliShell scripts? Switch will not enter all cases but once its in a case, it will not exit the switch on break as you would expect:

More stuff will come tomorrow.

1 Like