Skip to content

Commit e2d1fa5

Browse files
author
Anna Gringauze
committed
Added test
1 parent b44d47d commit e2d1fa5

File tree

3 files changed

+39
-4
lines changed

3 files changed

+39
-4
lines changed

dwds/lib/src/debugging/metadata/symbol_provider.dart

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,8 +179,12 @@ class SymbolTable {
179179
functionTypes.addAll({
180180
unresolvedFunctionType.id: unresolvedFunctionType,
181181
});
182-
types..addAll(classes)..addAll(functionTypes);
183-
scopes..addAll(classes)..addAll(libraries);
182+
types
183+
..addAll(classes)
184+
..addAll(functionTypes);
185+
scopes
186+
..addAll(classes)
187+
..addAll(libraries);
184188
}
185189

186190
FunctionSymbol getGlobalFunction(String localId) {

dwds/lib/src/services/chrome_proxy_service.dart

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ class ChromeProxyService implements VmServiceInterface {
9595
final ExpressionCompiler _compiler;
9696
ExpressionEvaluator _expressionEvaluator;
9797

98-
final bool _enableDebugSymbols;
98+
bool _enableDebugSymbols;
9999

100100
bool terminatingIsolates = false;
101101

@@ -125,7 +125,8 @@ class ChromeProxyService implements VmServiceInterface {
125125
_debuggerCompleter.complete(debugger);
126126

127127
if (_enableDebugSymbols) {
128-
throw UnimplementedError('Debug symbols are not uset yet.');
128+
_logger.warning('Ignoring --enable-debug-symbols (not implemented yet).');
129+
_enableDebugSymbols = false;
129130
}
130131
}
131132

webdev/test/e2e_test.dart

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,36 @@ void main() {
274274
}
275275
});
276276

277+
group('should not yet work with --enable-debug-symbols', () {
278+
test('run webdev', () async {
279+
var openPort = await findUnusedPort();
280+
// running daemon command that starts dwds without keyboard input
281+
var args = [
282+
'daemon',
283+
'web:$openPort',
284+
'--enable-expression-evaluation',
285+
'--enable-debug-symbols',
286+
'--verbose',
287+
];
288+
var process = await runWebDev(args, workingDirectory: exampleDirectory);
289+
try {
290+
await expectLater(process.stdout,
291+
emitsThrough(contains('Ignoring --enable-debug-symbols')));
292+
293+
// Wait for debug service Uri
294+
String wsUri;
295+
await expectLater(process.stdout, emitsThrough((String m) {
296+
wsUri = getDebugServiceUri(m);
297+
return wsUri != null;
298+
}));
299+
expect(wsUri, isNotNull);
300+
} finally {
301+
await exitWebdev(process);
302+
await process.shouldExit();
303+
}
304+
});
305+
});
306+
277307
group('should work with ', () {
278308
for (var soundNullSafety in [false, true]) {
279309
var nullSafetyOption = soundNullSafety ? 'sound' : 'unsound';

0 commit comments

Comments
 (0)