/
EvilBeaver
/
OneScript
Обзор
Документация
Войти
/
EvilBeaver
/
OneScript
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
v2.0.3-alpha
src/VSCode.DebugAdapter/ProtocolExtensions.cs
34 строки
1006 B
Andrei Ovsiankin
Точки останова в динамических модулях рушат отладчик. fixed https://github.com/nixel2007/moskito/issues/31
02 июн 2020, 22:37
02 июн 2020, 22:37
474406e
Код
Авторство
О чём код?
/*---------------------------------------------------------- This Source Code Form is subject to the terms of the Mozilla Public License, v.2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. ----------------------------------------------------------*/ using VSCodeDebug; using StackFrame = OneScript.DebugProtocol.StackFrame; namespace VSCode.DebugAdapter { public static class ProtocolExtensions { public static bool IsStringModule(this StackFrame frame) { return frame.Source == "<string>"; } public static Source GetSource(this StackFrame frame) { if (frame.IsStringModule()) { return new Source(frame.Source, null) { origin = frame.Source, presentationHint = "deemphasize" }; } return new Source(frame.Source); } } }