VSC Playground Result - No output

I installed the MongoDB plugin for a Visual Studio Code.
I run a script in the playground but there is no output either in the ‘Output’ tab or in the ‘Playground Result’ (undefined) tab windows.

The print command did send the text to the Output tab but missing the database-related output.

What needs to be configured so I can see the database-related output?

Hi @Saptaji_Basuki, welcome to the community! Glad to have you here!

What database is selected before you run the query? I believe the default database is set to test when new playground is launched. Highlight and run the use <db> statement along with the query to see if that resolves your issue.

Thanks,
Mahi

@mahisatya
Thank you for your response.

I don’t know if this is related. I disabled the ‘Code Runner’ VSCode extension and now I can see the output.

Things are working fine now. Thank you.

I can see output from console.log('hello world') in the Output tab,
but not with console.log(db.collectionName.find({}).length)

UPDATE: I found a fix:
console.log(db.collectionName.find({}).toArray().length)