/
EvilBeaver
/
OneScript
Обзор
Документация
Войти
/
EvilBeaver
/
OneScript
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
v1.9.0
src/VSCode.DebugAdapter/ProtocolExtensions.cs
36 строк
1 KB
Michael Rybakin
fix #1152: ошибка отладчика на точках останова после Выполнить()/Вычислить()
18 апр 2022, 17:07
18 апр 2022, 17:07
f875258
Код
Авторство
О чём код?
/*---------------------------------------------------------- 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 { private static readonly char[] specialChars = new char[] { '<', '>' }; public static bool IsStringModule(this StackFrame frame) { return frame.Source.IndexOfAny(specialChars) != -1; } 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); } } }