Ignore compat entry for loading extension (for debugging)

I am working on a project that uses package A, which provides an extension when B is loaded.

B has a [compat] entry as a weak dependency in A.

Debugging a problem requires that I use B#main. So it will not load the extension, because the compat entry has the latest release.

Is there a workaround for this, ie to suspend compat checking for extensions? (Other than the obvious one, ie dev A, remove the compat entry, etc).