Closed PrzemyslawKlys closed 5 years ago
@PrzemyslawKlys I think I've seen similar behavior with Pester. Occasionally I'll get a little warning that says:
WARNING: OS Information retrieval is not possible, reports will contain only partial system data
This could be an issue with Pester. Were you doing anything with Pester when you were seeing this?
Also, can you please attach the logs?
No. Not doing pester. I've seen this multiple times. I often hit an invisible version of it (or at least i think so) when F5 does nothing and VS Code says debug sessions is in progress. Something is triggering this. I would say it's more related to Formatting on Save or something similar.
Don't have logs thou. Or I have so many of them that I can't find this one you need. I'll try to see next time what I can provide. I have lots of logs for crashes on delete but that's on another issue.
Would you mind sharing which debug config you are using?
Is that what you mean?
{
"vsicons.dontShowNewVersionMessage": true,
"html.format.wrapLineLength": 0,
"sync.gist": "private",
"sync.lastUpload": "2018-05-03T08:43:52.422Z",
"sync.autoDownload": false,
"sync.autoUpload": false,
"sync.lastDownload": "",
"sync.forceDownload": false,
"sync.host": "",
"sync.pathPrefix": "",
"sync.quietSync": false,
"sync.askGistName": false,
"workbench.activityBar.visible": true,
"workbench.statusBar.visible": true,
"window.menuBarVisibility": "default",
"window.zoomLevel": 0,
"powershell.powerShellExePath": "C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\powershell.exe",
"editor.formatOnSave": true,
"editor.formatOnType": false,
"editor.fontSize": 13,
"editor.minimap.enabled": false,
"files.trimFinalNewlines": true,
"files.trimTrailingWhitespace": true,
"powershell.codeFormatting.newLineAfterCloseBrace": false,
"powershell.integratedConsole.showOnStartup": false,
"powershell.debugging.createTemporaryIntegratedConsole": false,
"powershell.codeFormatting.preset": "OTBS",
"git.autofetch": false,
"gitlens.advanced.messages": {
"suppressShowKeyBindingsNotice": true
},
"sync.removeExtensions": true,
"sync.syncExtensions": true,
"files.exclude": {
"**/.git": true,
"**/.svn": true,
"**/.hg": true,
"**/CVS": true,
"**/.DS_Store": true,
"**/.vs": true
},
"workbench.colorTheme": "Monokai",
"workbench.iconTheme": "vscode-icons",
"bookmarks.navigateThroughAllFiles": true,
"workbench.sideBar.location": "left",
"debug.internalConsoleOptions": "neverOpen",
"debug.openDebug": "neverOpen",
"debug.openExplorerOnEnd": false,
"debug.showInStatusBar": "never",
"powershell.developer.editorServicesLogLevel": "Diagnostic",
"terminal.integrated.rendererType": "dom",
"extensions.autoUpdate": true,
"powershell.scriptAnalysis.enable": false,
"gitlens.defaultDateFormat": "Do, MMMM, YYYY, HH:mm:ss",
"gitlens.settings.mode": "advanced",
"gitlens.menus": {
"editor": {
"blame": false,
"clipboard": true,
"compare": true,
"details": true,
"history": false,
"remote": true
},
"editorGroup": {
"blame": true,
"compare": true,
"history": false,
"remote": true
},
"editorTab": {
"compare": true,
"history": false,
"remote": true
},
"explorer": {
"compare": true,
"history": true,
"remote": true
}
},
"gitlens.codeLens.scopes": [
"document",
"containers"
],
"gitlens.statusBar.reduceFlicker": true,
"sshfs.configs": [
{
"label": "EvoServices",
"root": "/",
"host": "192.168.240.198",
"port": 22,
"username": "pklys",
"password": true,
"name": "EvoServices"
},
{
"label": "EvoServices",
"root": "/",
"host": "192.168.240.198",
"port": 22,
"username": "pklys",
"password": true,
"name": "evoservices"
}
],
"extensions.showRecommendationsOnlyOnDemand": true,
"debug.toolBarLocation": "docked",
"window.title": "${rootName}",
"breadcrumbs.enabled": true,
"github.hosts": [
{
"host": "https://github.com",
"username": "oauth",
"token": "system"
}
],
"workbench.statusBar.feedback.visible": false
}
// Empty
[
{
"key": "ctrl+f5",
"command": "workbench.action.debug.start",
"when": "!inDebugMode"
},
{
"key": "f5",
"command": "-workbench.action.debug.start",
"when": "!inDebugMode"
},
{
"key": "f5",
"command": "workbench.action.debug.run",
"when": "!inDebugMode"
},
{
"key": "ctrl+f5",
"command": "-workbench.action.debug.run",
"when": "!inDebugMode"
},
{
"key": "f5",
"command": "-workbench.action.debug.continue",
"when": "inDebugMode"
}
]
Or you need something else? I am pretty open to deliver anything :-) Rest of the settings is defaults of VsCode. And I use F5 to run my scripts. Not Ctrl+F5.
Not quite. If you have one, it would be in .vscode/launch.json
otherwise you're using the default.
I've not touched anything outside of settings/keymaps so default.
I know you said you weren't using Pester but do you have any Pester scripts in the workspace you're working with?
This might be the extension reloading Pester due to you debugging.
Not really no. PSWinDocumentation doesn't have pester. However it uses PSWriteWord/PSWriteExcel which both have pester tests but those are not loaded in the same VSCode. I often keep 3 or more VSCode open with different project. But I'm guessing it shouldn't interfere one another.
What is more than likely happening is module autoloading. If intellisense is triggered for a command that isn't currently loaded, but would be automatically loaded if invoked directly, then the module is imported. That's done for the syntax message and parameter intellisense.
Since Pester uses some pretty common short words for it's commands (in
/it
/should
/and
/but
/given
/then
/when
/etc) it's pretty likely you didn't notice you were typing the start of a Pester command.
That's a very good idea. So prevent this and any potential reloads in the middle of me working I should do import-module for all common modules, including Pester? I get quite a lot where I have VSCode claiming something is happening in background and yet I can't see anything.
System Details
$PSVersionTable
:Issue Description
So I'm working on a script when suddenly VSCode starts loading / reloading all modules
I've seen that happen few times already. Any reason it does that?
Attached Logs
Follow the instructions in the README about capturing and sending logs.