Skip to content

Commit

Permalink
增加web调试选项
Browse files Browse the repository at this point in the history
  • Loading branch information
xiyuesaves committed Feb 19, 2024
1 parent 0e32c37 commit 03381b3
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 1 deletion.
10 changes: 10 additions & 0 deletions src/config/view.html
Original file line number Diff line number Diff line change
Expand Up @@ -678,6 +678,16 @@ <h2>主进程调试</h2>
</div>
</li>
<hr class="horizontal-dividing-line" />
<li class="vertical-list-item">
<div>
<h2>web调试</h2>
<span class="secondary-text">调试用,普通用户请勿开启</span>
</div>
<div class="showWeb q-switch">
<span class="q-switch__handle"></span>
</div>
</li>
<hr class="horizontal-dividing-line" />
<li class="vertical-list-item">
<div>
<h2>显示进程通信数据</h2>
Expand Down
1 change: 1 addition & 0 deletions src/defaultConfig/defaultConfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"debug": {
"console": false,
"mainConsole": false,
"showWeb": false,
"showChannedCommunication": false
},
"wordSearch": {
Expand Down
4 changes: 3 additions & 1 deletion src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,9 @@ function onLoad(plugin) {

if (options.debug.mainConsole) {
let mainLogs = new logs("主进程");
mainLogs.startLogServer();
if(options.debug.showWeb){
mainLogs.startLogServer();
}
log = mainLogs.log;
// let renderLogs = new logs("渲染进程");
// renderLog = renderLogs.log;
Expand Down
1 change: 1 addition & 0 deletions src/pages/configView.js
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@ async function onConfigView(view) {
addSwitchEventlistener("message.convertMiniPrgmArk", ".switchDisabledMiniPrgm");

// debug开关
addSwitchEventlistener("debug.showWeb", ".showWeb");
addSwitchEventlistener("debug.console", ".switchDebug");
addSwitchEventlistener("debug.mainConsole", ".switchMainDebug");
addSwitchEventlistener("debug.showChannedCommunication", ".showChannedCommunication");
Expand Down

0 comments on commit 03381b3

Please sign in to comment.