修正编辑器,调试器选择

This commit is contained in:
liujianjun 2024-07-04 15:27:34 +08:00
parent 08d81e052f
commit 0db9c5a249
4 changed files with 42 additions and 41 deletions

View File

@ -41,7 +41,7 @@ type teditorform = class(TVCform) //
const c_m_close_min = "关闭时最小化"; const c_m_close_min = "关闭时最小化";
const c_m_lang = "语言"; const c_m_lang = "语言";
const c_m_run = "运行"; const c_m_run = "运行";
const c_m_editor = "编辑器"; const c_m_editor = "ĬÈÏ";
const c_m_exer = "当前执行程序"; const c_m_exer = "当前执行程序";
const c_m_help = "帮助"; const c_m_help = "帮助";
const c_m_tsl_help = "tsl语言帮助"; const c_m_tsl_help = "tsl语言帮助";

View File

@ -1335,52 +1335,49 @@ type TTslDebuga=class(TCustomControl)
end end
function getdebuger(pms); //获得调试程序 function getdebuger(pms); //获得调试程序
begin begin
p := static pluginpath(); p := static pluginpath();
//FDebugExe := inireadstring("",p+"localediter.ini","debug","debuger","");
global g_debug_chooser; global g_debug_chooser;
if g_debug_chooser="当前执行程序" then if g_debug_chooser="当前执行程序" then
begin begin
FDebugExe := "1"; FDebugExe := "1";
end else end else
begin begin
FDebugExe := inireadstring("",p+"localediter.ini","debug","debuger","");
if not ifstring(FDebugExe) then FDebugExe := "";
end end
pms := " "; pms := " ";
//if FDebugExe="1" then //默认获取参数 ps := owner.getexecuteparams(FRuningfile);
// begin if ps then
ps := owner.getexecuteparams(FRuningfile); begin
if ps then psi := ps[0];
if fileexists("",psi)then
begin begin
psi := ps[0]; cmdexe := psi;
if fileexists("",psi)then end else
begin begin
cmdexe := psi; if FDebugExe="1" then
end else ExecuteCommand("showstr","当前指定的执行程序不存在!!");
begin
if FDebugExe="1" then
ExecuteCommand("showstr","当前指定的执行程序不存在!!");
end
psi := ps[1];
if psi and fileexists("",psi)then
begin
end else
begin
pms += " "+tostn(psi);
end
idx := 2;
while idx<length(ps) do
begin
psi := ps[idx];
if lowercase(psi)="-libpath" then
begin
idx += 2;
continue;
end
pms += " "+tostn(psi);
idx++;
end
end end
//end psi := ps[1];
if psi and fileexists("",psi)then
begin
end else
begin
pms += " "+tostn(psi);
end
idx := 2;
while idx<length(ps) do
begin
psi := ps[idx];
if lowercase(psi)="-libpath" then
begin
idx += 2;
continue;
end
pms += " "+tostn(psi);
idx++;
end
end
if(FDebugExe="1")and cmdexe then if(FDebugExe="1")and cmdexe then
begin begin
FDebugExe := cmdexe; FDebugExe := cmdexe;
@ -1393,7 +1390,7 @@ type TTslDebuga=class(TCustomControl)
begin begin
FDebugExe := fdefaultdbger; FDebugExe := fdefaultdbger;
ExecuteCommand("showstr","<用编辑器自带的调试器b:>"); ExecuteCommand("showstr","<用编辑器自带的调试器b:>");
end end
end end
function remotedbugok(); function remotedbugok();
begin begin

View File

@ -71,7 +71,11 @@ type t_func_finder_register = class(tsl_c_api_const) //
end end
fhooks[length(fhooks)] := f; fhooks[length(fhooks)] := f;
if not fhookptr then fhookptr := makeinstance(thisfunction(find_HOOK)); if not fhookptr then fhookptr := makeinstance(thisfunction(find_HOOK));
if not fhookseted then TSL_InterpSetFindFunctionHook(fhookptr); if not fhookseted then
begin
TSL_InterpSetFindFunctionHook(fhookptr);
fhookseted := true;
end
end end
function del_hook(f); function del_hook(f);
begin begin

Binary file not shown.