vscode-spell-checker icon indicating copy to clipboard operation
vscode-spell-checker copied to clipboard

Q: How to debug when cSpell is (!) not working at all?

Open nlfiedler opened this issue 5 years ago • 4 comments

By (!) I mean that in the Code status bar there is cSpell with an exclamation mark inside an hexagon. I've enabled debug logging and found the log file: nothing but boring debug logging. Code console is completely empty. I removed every setting, deleted Cache/CachedData, deleted the global state, too. Remove and re-install the extension, even installed an older version. Cannot get cSpell to work. The cSpell preferences screen all looks fine, no sign of trouble anywhere at all.

So the question is, when cSpell is not working at all, how do you debug? Open up source code and start adding printlns (sorry, I'm a Code novice, so I really don't have any idea)?

nlfiedler avatar Aug 27 '19 15:08 nlfiedler

I must be stupid, because despite all of my searching, I could not discover that the spell check was disabled in the workspace. Only by grepping the workspace file did I even notice. Looking at the Spell Check Preferences it seemed that everything was enabled, including in the workspace. The debug logs are shown below:

104	2019-08-27T15:42:10.500Z	setWorkspaceFolders folders URI: [file:///Users/nfiedler/projects/mokuroku]
105	2019-08-27T15:42:10.500Z	setWorkspaceBase URI: file:///Users/nfiedler/projects/mokuroku
106	2019-08-27T15:42:10.500Z	setWorkspaceBase: file:///Users/nfiedler/projects/mokuroku
107	2019-08-27T15:42:10.583Z	updateActiveSettings
108	2019-08-27T15:42:10.583Z	resetSettings
109	2019-08-27T15:42:10.836Z	Validate all documents
110	2019-08-27T15:42:10.836Z	Request Validate: v1	.../README.md
111	2019-08-27T15:42:10.836Z	getUriSettings:	.../README.md
112	2019-08-27T15:42:10.836Z	Start fetchUriSettings:	.../README.md
113	2019-08-27T15:42:10.836Z	Request Validate: v1	.../examples/tagged/src/main.rs
114	2019-08-27T15:42:10.836Z	getUriSettings:	.../examples/tagged/src/main.rs
115	2019-08-27T15:42:10.836Z	Start fetchUriSettings:	.../examples/tagged/src/main.rs
116	2019-08-27T15:42:10.837Z	fetchFolderSettings: URI file:///Users/nfiedler/projects/mokuroku
117	2019-08-27T15:42:10.837Z	getConfiguration	...
118	2019-08-27T15:42:10.841Z	readSettingsFiles:	/Users/nfiedler/projects/mokuroku/.vscode/cspell.json
			/Users/nfiedler/projects/mokuroku/.vscode/cSpell.json
			/Users/nfiedler/projects/mokuroku/.cspell.json
			/Users/nfiedler/projects/mokuroku/cspell.json
			/Users/nfiedler/projects/mokuroku/cSpell.json
119	2019-08-27T15:42:10.842Z	importSettings
120	2019-08-27T15:42:10.843Z	Finish fetchUriSettings:	.../README.md
121	2019-08-27T15:42:10.843Z	Finish fetchUriSettings:	.../examples/tagged/src/main.rs
122	2019-08-27T15:42:10.897Z	blocked? false	.../README.md
123	2019-08-27T15:42:10.897Z	blocked? false	.../examples/tagged/src/main.rs
124	2019-08-27T15:42:10.897Z	validateTextDocument skip:	.../README.md
125	2019-08-27T15:42:10.897Z	validateTextDocument skip:	.../examples/tagged/src/main.rs
126	2019-08-27T15:42:17.826Z	CodeAction Only: undefined Num: 0	.../README.md
127	2019-08-27T15:42:22.107Z	Request Validate: v1	.../vscode/mokuroku.code-workspace
128	2019-08-27T15:42:22.108Z	getUriSettings:	.../vscode/mokuroku.code-workspace
129	2019-08-27T15:42:22.108Z	Start fetchUriSettings:	.../vscode/mokuroku.code-workspace
130	2019-08-27T15:42:22.108Z	fetchFolderSettings: URI file:///
131	2019-08-27T15:42:22.108Z	getConfiguration	.../
132	2019-08-27T15:42:22.112Z	readSettingsFiles:	/.vscode/cspell.json
			/.vscode/cSpell.json
			/.cspell.json
			/cspell.json
			/cSpell.json
133	2019-08-27T15:42:22.113Z	Finish fetchUriSettings:	.../vscode/mokuroku.code-workspace
134	2019-08-27T15:42:22.523Z	Request Validate: v1	.../vscode/mokuroku.code-workspace
135	2019-08-27T15:42:22.723Z	Request Validate: v1	.../vscode/mokuroku.code-workspace
136	2019-08-27T15:42:22.905Z	Request Validate: v1	.../vscode/mokuroku.code-workspace
137	2019-08-27T15:42:23.207Z	Request Validate: v1	.../vscode/mokuroku.code-workspace
138	2019-08-27T15:44:24.402Z	CodeAction Only: undefined Num: 0	.../README.md
139	2019-08-27T15:50:13.128Z	CodeAction Only: undefined Num: 0	.../README.md
140	2019-08-27T15:50:16.320Z	CodeAction Only: undefined Num: 0	.../README.md
141	2019-08-27T15:50:17.073Z	CodeAction Only: undefined Num: 0	.../README.md
142	2019-08-27T15:50:17.482Z	Request Validate: v2	.../README.md
143	2019-08-27T15:50:17.522Z	CodeAction Only: undefined Num: 0	.../README.md
144	2019-08-27T15:50:17.532Z	blocked? false	.../README.md
145	2019-08-27T15:50:17.533Z	validateTextDocument skip:	.../README.md
146	2019-08-27T15:50:18.220Z	CodeAction Only: undefined Num: 0	.../README.md
147	2019-08-27T15:50:20.333Z	onWillSave: v2	.../README.md
148	2019-08-27T15:50:20.348Z	onDidSave: v2	.../README.md
149	2019-08-27T15:50:20.348Z	Request Validate: v2	.../README.md
150	2019-08-27T15:50:20.401Z	blocked? false	.../README.md
151	2019-08-27T15:50:20.401Z	validateTextDocument skip:	.../README.md

I can't tell how the spell check was disabled by looking at those logs.

Anyway, at least I finally found the problem and hand-edited the workspace file to fix it.

nlfiedler avatar Aug 29 '19 02:08 nlfiedler

Wow, what a frustrating experience!

Jason3S avatar Aug 30 '19 08:08 Jason3S

I had exactly the same issue! I'm sure I didn't disable cSpell in the workspace by myself.

viktomas avatar Jan 15 '20 10:01 viktomas

Same here. I found "cSpell.enabled": false in my workspace settings. No idea why I would have set that...

hjfreyer avatar Mar 16 '21 14:03 hjfreyer