Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Xdebug step debugging #335

Open
wants to merge 33 commits into
base: 3.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
wip
  • Loading branch information
luanfreitasdev committed Dec 30, 2024
commit 418ed9f50f3b8db8b6d39aac01e923423021208a
10 changes: 5 additions & 5 deletions src/renderer/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -351,15 +351,15 @@ const dumpListeners = () => {
});

window.ipcRenderer.on("validate", (event, { content }) => {
let textContent;
const filterPayload = payload.value.filter((globalPayload: Payload) => globalPayload.id === content.id)[0];
let textContent: string;
const filterPayload: Payload = payload.value.filter((globalPayload: Payload) => globalPayload.id === content.id)[0];

if (filterPayload.hasOwnProperty("json")) {
textContent = filterPayload.json.original_content;
textContent = filterPayload.json?.original_content || '';
}

if (filterPayload.hasOwnProperty("dump")) {
textContent = filterPayload.dump.original_content;
textContent = filterPayload.dump?.original_content || '';
}

const strContains = Helper.strContains(textContent, content.validate.content, {
Expand Down Expand Up @@ -575,7 +575,7 @@ type EventType = "label" | "color" | "screen" | "dump";

const interval = ref(null);

const dispatch = (type: string, event: EventType, content: any): void => {
const dispatch = (type: string, event: Electron.IpcRendererEvent, content: any): void => {
if (isPaused.value) {
return;
}
Expand Down
3 changes: 0 additions & 3 deletions src/renderer/store/payload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,5 @@ export const usePayloadStore = defineStore("payload", {
clearAll() {
this.payload = [];
}
},
persist: {
enabled: true
}
});
15 changes: 5 additions & 10 deletions src/renderer/store/screen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { ScreenPayload } from "@/types/Payload";

type State = {
screen: string;
screens: [];
screens: ScreenPayload[];
pinned?: string | null;
};

Expand All @@ -17,7 +17,7 @@ export const useScreenStore = defineStore("screen", {
this.screen = value;
},
add(screen: ScreenPayload) {
const exists = this.screens.filter((screenPayload: ScreenPayload) => screen.screen_name === screenPayload.screen_name).length > 0;
const exists = this.screens.some((screenPayload: ScreenPayload) => screenPayload.screen_name === screen.screen_name);

if (!exists) {
this.screens.push(screen);
Expand All @@ -32,10 +32,8 @@ export const useScreenStore = defineStore("screen", {
all() {
return this.screens;
},
get(screen: string) {
return this.screens.filter((screenPayload: ScreenPayload) => {
return screenPayload.screen_name === screen;
})[0];
get(screenName: string) {
return this.screens.find((screenPayload: ScreenPayload) => screenPayload.screen_name === screenName) || null;
},
toggleVisible(screenName: string) {
this.screens = this.screens.map((screen: ScreenPayload) => {
Expand All @@ -58,10 +56,7 @@ export const useScreenStore = defineStore("screen", {
if (index === -1) return null;

const nextIndex = (index + 1) % this.screens.length;
return this.screens[nextIndex];
return this.screens[nextIndex] || null;
}
},
persist: {
enabled: true
}
});